Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failing tests in S03-operators/set_*.t, probably wrong multi selected #6644

Closed
p6rt opened this issue Nov 28, 2017 · 5 comments
Closed

Failing tests in S03-operators/set_*.t, probably wrong multi selected #6644

p6rt opened this issue Nov 28, 2017 · 5 comments
Labels
JVM Related to Rakudo-JVM

Comments

@p6rt
Copy link

p6rt commented Nov 28, 2017

Migrated from rt.perl.org#132514 (status was 'resolved')

Searchable as RT132514$

@p6rt
Copy link
Author

p6rt commented Nov 28, 2017

From @usev6

Currently the following test files under S03-operators do not run
to completion on the JVM backend​:

  S03-operators/set_addition.t aborted 513 test(s)
  S03-operators/set_difference.t aborted 2 test(s)
  S03-operators/set_multiply.t aborted 513 test(s)
  S03-operators/set_proper_subset.t aborted 2 test(s)
  S03-operators/set_subset.t aborted 2 test(s)
  S03-operators/set_symmetric_difference.t aborted 2 test(s)
  S03-operators/set_union.t aborted 404 test(s)

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
  in infix​:<(+)> (gen/jvm/CORE.setting​:48959)
  in infix​:<(+)> (gen/jvm/CORE.setting​:48952)
  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)

  $ ./perl6-j --version
  This is Rakudo version 2017.11-38-g1668b4f0b built on JVM
  implementing Perl 6.c.

For some reasons the fourth statement calls a multi sub
of &infix​:<(+)> with two parameters​: https://github.com/rakudo/rakudo/blob/e7c0a644753705891bf340ae6dc6e4f0cc63ddee/src/core/set_addition.pm#L12

I've run the above code on an older commit (4efcc29c80, 2017-02-06)
and there was no error.

@p6rt
Copy link
Author

p6rt commented Dec 3, 2017

From @usev6

On Tue, 28 Nov 2017 12​:35​:42 -0800, bartolin@​gmx.de 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.

@p6rt
Copy link
Author

p6rt commented Dec 12, 2017

From @usev6

There was indeed something wrong with the multi cache on the JVM backend. Fixed with Raku/nqp@7eaebf5abd

I'm closing this ticket as 'resolved'.

1 similar comment
@p6rt
Copy link
Author

p6rt commented Dec 12, 2017

From @usev6

There was indeed something wrong with the multi cache on the JVM backend. Fixed with Raku/nqp@7eaebf5abd

I'm closing this ticket as 'resolved'.

@p6rt
Copy link
Author

p6rt commented Dec 12, 2017

@usev6 - Status changed from 'new' to 'resolved'

@p6rt p6rt closed this as completed Dec 12, 2017
@p6rt p6rt added the JVM Related to Rakudo-JVM label Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
JVM Related to Rakudo-JVM
Projects
None yet
Development

No branches or pull requests

1 participant