# New Ticket Created by Peter # Please include the string: [perl #122220] # in the subject line of all future correspondence about this issue. # <URL: https://rt.perl.org/Ticket/Display.html?id=122220 >
10:37 ren1us m: sub a(@list is copy, $l = @list.elems) { say "Elems: " ~ @list.elems; say "l: $l"; }; a(<a b c d e f g>); a(<a b c>); 10:37 camelia rakudo-moar cce7f9: OUTPUT«Elems: 7l: 7Elems: 3l: 7» 10:37 ren1us m: sub a(@list, $l = @list.elems) { say "Elems: " ~ @list.elems; say "l: $l"; }; a(<a b c d e f g>); a(<a b c>); 10:37 camelia rakudo-moar cce7f9: OUTPUT«Elems: 7l: 7Elems: 3l: 3» 10:45 colomon_ sure looks like a rakudobug 10:45 * ren1us submits 10:47 jnthn What the thunk... 10:48 jnthn I think the first one goes through the slow-path binder thanks to the "is copy" 10:49 ren1us m: class A { method test(@list is copy, $l = @list.elems) { say "Elems: " ~ @list.elems; say "l: $l"; }; }; my $a = A.new; $a.test(<a b c d e f g>); $a.test(<a b c>); 10:49 camelia rakudo-moar cce7f9: OUTPUT«Elems: 7l: 7Elems: 3l: 7» 10:49 jnthn So the bug is probably in there.