New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inaccurate assignment to $!shortname in cases where a mixin happens during BUILD time. #5242
Comments
From @peschwaConsider the following snippet: 23:28 < psch> m: role Bar::Foo { }; class A { submethod BUILD { self does Bar::Foo } }; A.new.WHAT.say 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. |
From @jnthnOn Sun Apr 17 16:34:02 2016, peschwa@gmail.com wrote:
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 |
The RT System itself - Status changed from 'new' to 'open' |
From @peschwaOn Wed Apr 20 02:54:29 2016, jnthn@jnthn.net wrote:
Fixed in Rakudo commit 60550d15, test added in roast commit 95a5c18. |
From @usev6On Sun Apr 24 03:51:25 2016, peschwa@gmail.com wrote:
Great! I'm closing this ticket as 'resolved'. |
@usev6 - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#127916 (status was 'resolved')
Searchable as RT127916$
The text was updated successfully, but these errors were encountered: