On Wed Nov 05 22:58:18 2008, [EMAIL PROTECTED] wrote: > There are two bugs here. The attached patch fixes bug #2 but not bug > #1. > > Bug #1) "role A::B" is not interpreted as a role, but just as a module. > > ./perl6 -e 'role A { method foo { say "Foo"; } }; say A.WHAT' > Role > > ./perl6 -e 'role A::B { method foo { say "Foo"; } }; say A::B.WHAT' > Module > Fixed.
> Bug #2) applying a role searches for the role in the wrong namespace. > > ./perl6 -e 'role A::B { method foo { say "Foo"; } }; class B does > A::B {}; B.new.foo' > Method 'foo' not found for invocant of class 'B' > > ./perl6 -e 'role A::B { method foo { say "Foo"; } }; class A::B::C > does A::B {}; A::B::C.new.foo' > Method 'foo' not found for invocant of class 'A;B;C' > Applied your patch with minor simplifications to the code and with my fix to issue #1, it does indeed resolve this issue. Both in together as r33215, plus added a few tests. Thanks! Jonathan