# New Ticket Created by "Jimmy Zhuo" # Please include the string: [perl #102362] # in the subject line of all future correspondence about this issue. # <URL: https://rt.perl.org:443/rt3/Ticket/Display.html?id=102362 >
JimmyZ perl6: sub f(:$x, :&x) { say $x }; f(:x(min(6,2,3)), :x(1, 2, 3)) p6eval niecza v10-66-g71325b0: OUTPUT«===SORRY!===Undeclared routine: 'min' used at line 1Potential difficulties: &x is declared but not used at /tmp/JqYiXINZ05 line 1:------> sub f(:$x, :⏏&x) { say $x }; f(:x(min(6,2,3)), :x(1, Unhandled Excepti… p6eval ..pugs b927740: OUTPUT«123» p6eval ..rakudo 158bd0: OUTPUT«1 2 3» moritz is kinda surprised that it doesn't blow up JimmyZ perl6: sub f(:$x, :$x) { say $x }; f(:x(min(6,2,3))) p6eval niecza v10-66-g71325b0: OUTPUT«===SORRY!===Undeclared routine: 'min' used at line 1Potential difficulties: Useless redeclaration of variable $x (see line 1) at /tmp/8B3kFxpiJZ line 1:------> sub f(:$x, :$x⏏) { say $x }; f(:x(min(6,2,3)))Un… p6eval ..pugs b927740: OUTPUT«2» p6eval ..rakudo 158bd0: OUTPUT«===SORRY!===Redeclaration of symbol $x at line 1, near ") { say $x"» JimmyZ thinks it's a bug masak it is. masak such a signature with two named parameters save for the sigil is illegal. masak I remember moritz and me spec'ing the rules for that. moritz std: -> :$x, :&x { } p6eval std be1f10e: OUTPUT«ok 00:01 122m» masak STD is lagging JimmyZ std: -> :$x, :$x { } p6eval std be1f10e: OUTPUT«Potential difficulties: Useless redeclaration of variable $x (see line 1) at /tmp/FKzWHzu2P5 line 1:------> -> :$x, :⏏$x { }ok 00:01 121m» masak that's too lenient, if you ask me. masak it's fine for lexicals in general, but not for a siggie. JimmyZ perl6: sub f(:$x, :%x) { say $x }; p6eval pugs b927740, rakudo 158bd0: ( no output ) p6eval ..niecza v10-66-g71325b0: OUTPUT«Potential difficulties: %x is declared but not used at /tmp/UvwYaQgjMv line 1:------> sub f(:$x, :⏏%x) { say $x }; &f is declared but not used at /tmp/UvwYaQgjMv line 1:------> sub f⏏(:$x, :%x) { say $x };»… masak binding is serious business moritz and signatures are complex beasts JimmyZ niecza has this bug too