-
Notifications
You must be signed in to change notification settings - Fork 1
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
Some core Routines do not do Callable role #5561
Comments
From @zoffixznetTo me this looks like a bug, or at least an inconsistency. The failure to do a Callable means it can't be accepted into (&thing) in routines, which is how I discovered this: m: say Any.^can("push")[0] ~~ Callable; m: say Any.^can("push")[0].^mro m: say Any.^can("say")[0].^mro m: sub (&thing) {}( Any.^can("push")[0] ) m: sub (&thing) {}( Any.^can("say")[0] ) |
From @lizmatThe only difference between “push” and “say” I can find, is that “push” is marked “is nodal” However, trying to replicate this outside of the setting, does work as expected: $ 6 'class A { proto method a() is nodal { } }; say A.^can("a")[0] ~~ Callable Looks like it is even deeper, at the nqp level: $ 6 'use nqp; say nqp::istype(Any.^can("push")[0],Callable)’ Not sure where to go from here yet
|
The RT System itself - Status changed from 'new' to 'open' |
From @zoffixznetLooks like this bug affects subroutines too: m: say &defined ~~ Callable m: say [0,1,2,Any].grep(&defined) |
From @zoffixznetAlso affects some methods: <Zoffix__> m: my %h; say %h.AT-KEY: 1|2 |
From @zoffixznetOn Wed, 13 Dec 2017 19:23:38 -0800, cpan@zoffix.com wrote:
This bug is blocking a potential fix for RT#125614[^1]. If you fix this ticket, please take a look if the fix for that other one can be merged. [1] https://rt-archive.perl.org/perl6/Ticket/Display.html?id=125614 |
Migrated from rt.perl.org#128905 (status was 'open')
Searchable as RT128905$
The text was updated successfully, but these errors were encountered: