On Tue, 28 Nov 2017 12:35:42 -0800, [email protected] wrote:
> [...]
> I tried to golf the failures from set_addition.t and found the
> following:
>
> $ ./perl6-j --ll-exception -e '&infix:<(+)>(SetHash.new, SetHash.new,
> SetHash.new); &infix:<(+)>(|(Set.new, Set.new, Set.new));
> &infix:<(+)>(|(Set.new, Set.new, Set.new)); &infix:<(+)>(|(Set.new,
> Set.new, Set.new));'
> Too many positionals passed; expected 2 arguments but got 3
I was able to golf it further:
$ ./perl6-j --ll-exception -e 'multi sub f($) {}; multi sub f($,$) {
f(Any.new); f(Any.new); f(Any.new) }; f(Int.new,Int.new); say "alive";
f(Any.new,Any.new);'
alive
Too many positionals passed; expected 1 arguments but got 2
in f (-e:1)
in f (-e)
in <unit> (-e:1)
in <unit-outer> (-e:1)
in eval (gen/jvm/stage2/NQPHLL.nqp:1181)
in <anon> (gen/jvm/stage2/NQPHLL.nqp:1288)
in command_eval (gen/jvm/stage2/NQPHLL.nqp:1285)
in command_eval (src/Perl6/Compiler.nqp:42)
in command_line (gen/jvm/stage2/NQPHLL.nqp:1269)
in MAIN (gen/jvm/main.nqp:47)
in <mainline> (gen/jvm/main.nqp:38)
in <anon> (gen/jvm/main.nqp)
All occurences of 'Any' can be replaced with another type -- as long as it's
different from Int. Similarly one can replace Int with another type and still
get the same error.