Ticket #1640 (closed bug: fixed)
Method names that start with '@' are not recognized.
|Reported by:||shockwave||Owned by:|
Unless class methods cannot start with '@' (or just be named '@'), there is a bug in Parrot regarding that.
Regular subroutines (not methods) *can* be named '@'.
If this is the expected behavior (hopefully not), it should be marked as such in the docs.
# The following fails. Change to '*', and it succeeds.
.sub '%' :method
.sub 'main' :main
$P0 = newclass 'Test' $P1 = new 'Test' $P1.'%'()
# Error message: Method '@' not found for invocant of class 'Test'
My personal usecase of that is: In my language (as in C++), operators can be overloaded, included @. Such operator would create a method named '@', or a mangled version name something like '@m13_1', in PIR.