Closed p6rt closed 6 years ago
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.
This was fixed with https://github.com/perl6/nqp/commit/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'.
This was fixed with https://github.com/perl6/nqp/commit/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'.
@usev6 - Status changed from 'new' to 'resolved'
Migrated from rt.perl.org#132673 (status was 'resolved')
Searchable as RT132673$