# New Ticket Created by Solomon Foster
# Please include the string: [perl #83354]
# in the subject line of all future correspondence about this issue.
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=83354 >
A.pm:
class A {
has $.a;
multi sub infix:<+>(A $x, A $y) is export {
A.new(:a($x.a + $y.a));
}
}
B.pm:
use A;
class B {
has $.b;
multi sub infix:<+>(B $x, B $y) is export {
B.new(:b($x.b + $y.b));
}
}
c.pl:
use B;
use A; # comment this out and this works
say (B.new(:b(5)) + B.new(:b(2))).perl;
perl6 c.pl:
===SORRY!===
Can't import symbol &infix:<+> because it already exists in this lexical scope
--
Solomon Foster: [email protected]
HarmonyWare, Inc: http://www.harmonyware.com