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

"This type cannot unbox to a native string" error on jvm, parrot #3478

Closed
p6rt opened this issue Aug 9, 2014 · 5 comments
Closed

"This type cannot unbox to a native string" error on jvm, parrot #3478

p6rt opened this issue Aug 9, 2014 · 5 comments

Comments

@p6rt
Copy link

p6rt commented Aug 9, 2014

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

Searchable as RT122497$

@p6rt
Copy link
Author

p6rt commented Aug 9, 2014

From @dwarring

Consider​:

BEGIN my %cache = 1 => 0;
sub foo($n) {%cache{$n}​:exists}
say foo(42);

This runs successfully on MoarVM 2014.07-138-ga33da53, Both Parrot and JVM fail​:

perl6-p​:
This type cannot unbox to a native string
  in method exists_key at gen/parrot/CORE.setting​:9194
  in method exists_key at gen/parrot/CORE.setting​:9183
  in block at gen/parrot/CORE.setting​:2089
  in sub postcircumfix​:<{ }> at gen/parrot/CORE.setting​:2676
  in sub postcircumfix​:<{ }> at gen/parrot/CORE.setting​:2657
  in sub foo at tst.pl​:2
  in block at tst.pl​:3

perl6-j​:
This representation can not unbox to a native str
  in method exists_key at gen/jvm/CORE.setting​:9202
  in block at gen/jvm/CORE.setting​:2085
  in sub postcircumfix​:<{ }> at gen/jvm/CORE.setting​:2671
  in sub foo at tst.pl​:2
  in block at tst.pl​:3

The above is golfed from advent2012-day4.t, which has been failing over the last week, as have advent2011-day04.t and integration/advent2012-day21.t.

@p6rt
Copy link
Author

p6rt commented Nov 5, 2014

From @dwarring

I've bisected this on the JVM​:

1070a8970700b79f917d184e6eda3833a7d59fb7 is the first bad commit
commit 1070a8970700b79f917d184e6eda3833a7d59fb7
Author​: Elizabeth Mattijsen <liz@​dijkmat.nl>
Date​: Mon Aug 4 13​:51​:46 2014 +0200

  Bring implementation (exists|delete)_key in line

:040000 040000 b62e672249131826d421866b18ae464ac8c131c1 6dc18eb5557a9a64392411905a8b5bc0fbfb7656 M src

On Sat Aug 09 12​:35​:01 2014, david.warring wrote​:

Consider​:

BEGIN my %cache = 1 => 0;
sub foo($n) {%cache{$n}​:exists}
say foo(42);

This runs successfully on MoarVM 2014.07-138-ga33da53, Both Parrot and
JVM fail​:

perl6-p​:
This type cannot unbox to a native string
in method exists_key at gen/parrot/CORE.setting​:9194
in method exists_key at gen/parrot/CORE.setting​:9183
in block at gen/parrot/CORE.setting​:2089
in sub postcircumfix​:<{ }> at gen/parrot/CORE.setting​:2676
in sub postcircumfix​:<{ }> at gen/parrot/CORE.setting​:2657
in sub foo at tst.pl​:2
in block at tst.pl​:3

perl6-j​:
This representation can not unbox to a native str
in method exists_key at gen/jvm/CORE.setting​:9202
in block at gen/jvm/CORE.setting​:2085
in sub postcircumfix​:<{ }> at gen/jvm/CORE.setting​:2671
in sub foo at tst.pl​:2
in block at tst.pl​:3

The above is golfed from advent2012-day4.t, which has been failing
over the last week, as have advent2011-day04.t and
integration/advent2012-day21.t.

@p6rt
Copy link
Author

p6rt commented Jan 22, 2015

From @usev6

This works now (again)​:

$ perl6-j -e 'BEGIN my %cache = 1 => 0; sub foo($n) {%cache{$n}​:exists}; say foo(42)'
False
$ perl6-p -e 'BEGIN my %cache = 1 => 0; sub foo($n) {%cache{$n}​:exists}; say foo(42)'
False
$ perl6-m -e 'BEGIN my %cache = 1 => 0; sub foo($n) {%cache{$n}​:exists}; say foo(42)'
False

I unfudged the skipped tests and added a new test for the above code to S32-hash/exists-adverb.t with commit Raku/roast@317910afbd

I'm closing this ticket now.

1 similar comment
@p6rt
Copy link
Author

p6rt commented Jan 22, 2015

From @usev6

This works now (again)​:

$ perl6-j -e 'BEGIN my %cache = 1 => 0; sub foo($n) {%cache{$n}​:exists}; say foo(42)'
False
$ perl6-p -e 'BEGIN my %cache = 1 => 0; sub foo($n) {%cache{$n}​:exists}; say foo(42)'
False
$ perl6-m -e 'BEGIN my %cache = 1 => 0; sub foo($n) {%cache{$n}​:exists}; say foo(42)'
False

I unfudged the skipped tests and added a new test for the above code to S32-hash/exists-adverb.t with commit Raku/roast@317910afbd

I'm closing this ticket now.

@p6rt p6rt closed this as completed Jan 22, 2015
@p6rt
Copy link
Author

p6rt commented Jan 22, 2015

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant