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

Container has no information about parametric type #6657

Closed
p6rt opened this issue Jan 1, 2018 · 4 comments
Closed

Container has no information about parametric type #6657

p6rt opened this issue Jan 1, 2018 · 4 comments
Labels
JVM Related to Rakudo-JVM

Comments

@p6rt
Copy link

p6rt commented Jan 1, 2018

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

Searchable as RT132673$

@p6rt
Copy link
Author

p6rt commented Jan 1, 2018

From @usev6

After a recent change to roast [1] there are some new failing tests on
the JVM backend similiar to this one​:

$ ./perl6-j -Ilib -e 'use Test; is({"a" => 1}.keyof, Str(Any))'
not ok 1 -
# Failed test at -e line 1
# expected​: (?(?))
# got​: (?(?))

If I'm not mistaken, the underlying problem is, that information about
a parametric type is not available once something like Str(Any)
(Perl6​::Metamodel​::CoercionHOW) is put into a container.

$ ./perl6-j -e 'use nqp; my $bar = Str(Any); say nqp​::isnull(nqp​::typeparameterized($bar)); say $bar.^name; say nqp​::isnull(nqp​::typeparameterized(nqp​::decont($bar))); say nqp​::decont($bar).^name'
1
?(?)
0
Str(Any)

This does not happen on MoarVM​:

$ ./perl6-m -e 'use nqp; my $bar = Str(Any); say nqp​::isnull(nqp​::typeparameterized($bar)); say $bar.^name; say nqp​::isnull(nqp​::typeparameterized(nqp​::decont($bar))); say nqp​::decont($bar).^name'
0
Str(Any)
0
Str(Any)

I'm not sure if this should to be fixed in JVM specific code (nqp) or
at a higher level (using nqp​::decont in Rakudo). Currently we don't
use any nqp​::decont in src/Perl6/Metamodel/CoercionHOW.nqp and
friends.

[1] Raku/roast@7145799cce

@p6rt
Copy link
Author

p6rt commented Jan 8, 2018

From @usev6

This was fixed with Raku/nqp@f6bccf79d8

Only some of the fudged tests are passing now, since a different issue surfaced after the above fix​: https://rt-archive.perl.org/perl6/Ticket/Display.html?id=132694

I'm closing this ticket as 'resolved'.

1 similar comment
@p6rt
Copy link
Author

p6rt commented Jan 8, 2018

From @usev6

This was fixed with Raku/nqp@f6bccf79d8

Only some of the fudged tests are passing now, since a different issue surfaced after the above fix​: https://rt-archive.perl.org/perl6/Ticket/Display.html?id=132694

I'm closing this ticket as 'resolved'.

@p6rt
Copy link
Author

p6rt commented Jan 8, 2018

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

@p6rt p6rt closed this as completed Jan 8, 2018
@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