# New Ticket Created by  Zoffix Znet 
# Please include the string:  [perl #128905]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/Ticket/Display.html?id=128905 >


To 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;
rakudo-moar c587b9: OUTPUT«False␤»

m: say Any.^can("push")[0].^mro
rakudo-moar c587b9: OUTPUT«((Method+{<anon|42801984>}) (Method) (Routine) 
(Block) (Code) (Any) (Mu))␤»

m: say Any.^can("say")[0].^mro
rakudo-moar c587b9: OUTPUT«((Method) (Routine) (Block) (Code) (Any) (Mu))␤»

m: sub (&thing) {}( Any.^can("push")[0] )
rakudo-moar c587b9: OUTPUT«Type check failed in binding to &thing; expected 
Callable but got Method+{<anon|42801984>} (Method+{<anon|4280198...)␤  in sub  
at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»

m: sub (&thing) {}( Any.^can("say")[0] )
rakudo-moar c587b9: ( no output )


Reply via email to