# New Ticket Created by "Carl Mäsak" # Please include the string: [perl #77744] # in the subject line of all future correspondence about this issue. # <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=77744 >
<masak> rakudo: sub f($x, $y) { say $x }; my &g = &f.assuming(5); g <p6eval> rakudo 859f2d: OUTPUT«Not enough positional parameters passed; got 1 but expected 2 in 'f' [...] <masak> ok, one could argue that the numbers should be 0 and 1, respectively, and that the function should be g. <masak> but fair enough, not necessarily a bug. <masak> this, however: <masak> rakudo: class A { our method f($x: $y) { say $x } }; my $a = A.new; my &g = &A::f.assuming( x => $a ); g <p6eval> rakudo 859f2d: OUTPUT«Not enough positional parameters passed; got 0 but expected 2 in 'A::f' [...] * masak submits rakudobug <masak> I never have liked, and probably never will like the fact that the invocant is counted among the positional parameters. but I'm willing to write that off as a hard-to-fix Parrot idiosyncracy. <masak> but the 0 there is wrong. we are passing in one of the two arguments. <masak> can't have it both ways :) <masak> rakudo: class A { our method f($x: $y, $z) { say $x } }; my $a = A.new; my &g = &A::f.assuming( y => 42, z => 5 ); g <p6eval> rakudo 859f2d: OUTPUT«Not enough positional parameters passed; got 0 but expected 3 in 'A::f' [...] <masak> seems it always gives 0.