# New Ticket Created by Solomon Foster
# Please include the string: [perl #83356]
# in the subject line of all future correspondence about this issue.
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=83356 >
If I have this:
class A {
multi sub infix:<+>(A $a, A $b) is export { say "hello" }
}
my A $a .= new;
say ($a + $a).perl;
I get
Can't take numeric value for object of type A
in 'Any::Numeric' at line 1456:CORE.setting
in 'infix:<+>' at line 7454:CORE.setting
in main program body at line 8:frip.pl
which implies that infix:<+>($a, $b) is actually being called.
If I switch it to
class A {
}
multi sub infix:<+>(A $a, A $b) is export { say "hello" }
my A $a .= new;
say ($a + $a).perl;
it works as I expected:
hello
Bool::True
This is Rakudo Perl 6, version 2011.01-17-g2666b6f built on parrot
3.0.0 RELEASE_3_0_0-350-g814a916
--
Solomon Foster: [email protected]
HarmonyWare, Inc: http://www.harmonyware.com