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
can() on an Enum item doesn't work #4335
Comments
From @jonathanstoweHi, my enum Bar <A B C>; say B.value; say B.can("value"); 1 It looks like "can()" is being passed possibly the flattened Enum or something. |
From @lizmat
This appears to be a codegen issue somehow. The call to Mu.can is generated with a (superfluous) Perl6::Metamodel::EnumHOW object as the first (SELF) argument, rather than B. Liz |
The RT System itself - Status changed from 'new' to 'open' |
From @jnthnOn Sun Jun 21 03:10:36 2015, jns+bc@gellyfish.co.uk wrote:
Turns out far more interesting. The EnumHOW meta-object lacked an implementation of can like ClassHOW, and it then ended up calling the inherited NQPMu.can(...), which expects just the one object being a non-meta-method. Fixed in Rakudo, added tests for .can and .^can to S12-enums/thorough.t. |
@jnthn - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#125445 (status was 'resolved')
Searchable as RT125445$
The text was updated successfully, but these errors were encountered: