# New Ticket Created by "Carl Mäsak" # Please include the string: [perl #123116] # in the subject line of all future correspondence about this issue. # <URL: https://rt.perl.org/Ticket/Display.html?id=123116 >
<masak> m: class Dog {}; sub foo(&block (Dog --> Bool)) { say "OH HAI" }; foo(sub (Dog $x) { $x }) <camelia> rakudo-moar 315ec6: OUTPUT«Too few positionals passed; expected 1 argument but got 0 in sub-signature of parameter &block [...] <masak> what am I doing wrong here? <masak> m: class Dog {}; sub foo(&block:(Dog --> Bool)) { say "OH HAI" }; foo(sub (Dog $x) { $x }) <camelia> rakudo-moar 315ec6: OUTPUT«===SORRY!===Cannot invoke this object (REPR: P6opaque, cs = 0)» <masak> o.O <FROGGS> m: sub foo ( &cb (int) ) { }; sub bar (int) { }; foo(&bar) # masak: no idea why that fails <camelia> rakudo-moar 315ec6: OUTPUT«Too few positionals passed; expected 1 argument but got 0 in sub-signature of parameter &cb [...] <masak> FROGGS: the error message doesn't make any sense. <FROGGS> masak: and that feature works in nativecall <FROGGS> it is in its test suite for example <masak> even curiouser. <FROGGS> and it also fails under 2014.09 <FROGGS> (using star-m) I am not 100% sure the `&block (Dog --> Bool)` form should work, or is by spec. The `&block:(Dog --> Bool)` form comes from S06:1675.