On Sun Apr 17 16:34:02 2016, pesc...@gmail.com wrote: > Consider the following snippet: > > 23:28 < psch> m: role Bar::Foo { }; class A { submethod BUILD { self > does Bar::Foo } }; A.new.WHAT.say > 23:28 <+camelia> rakudo-moar 617bb4: OUTPUT«(Foo})» > > Clearly, A is not of type 'Foo}'. As far as I can tell > Perl6::Metamodel::Naming is involved, although I'm not sure why this > only happens with mixins during BUILD. I'd expect .WHAT to report > 'A+{Bar::Foo}' instead.
Nothing to do build BUILD. It golfs to: role Foo::Bar { }; say (42 but Foo::Bar).^shortname And it'll be because of this overly-naive code: https://github.com/rakudo/rakudo/blob/nom/src/Perl6/Metamodel/Naming.nqp#L6 Maybe set_name should take an optional second parameter for the short name, and the mixin code can set it explicitly. /jnthn