Skip Menu |
Report information
Id: 127832
Status: new
Priority: 0/
Queue: perl6

Owner: Nobody
Requestors: rob [at] hoelz.ro
Cc:
AdminCc:

Severity: (no value)
Tag: (no value)
Platform: (no value)
Patch Status: (no value)
VM: (no value)



Subject: Parameterizing a role via a variable results in an error
Download (untitled) / with headers
text/plain 499b
See the attached file. If you store a parameterized role in a variable and attempt to parameterize it via postcircumfix:sym<[ ]>, you get a cryptic error message: Show quoted text
> No appropriate parametric role variant available for 'R' > in any specialize at gen/moar/m-Metamodel.nqp line 2609 > in any compose at gen/moar/m-Metamodel.nqp line 2988 > in any make_pun at gen/moar/m-Metamodel.nqp line 1692 > in any find_method at gen/moar/m-Metamodel.nqp line 1720 > in block <unit> at test.pl line 11
Subject: test.pl
Download test.pl
text/x-perl 416b
use v6; role R[$value] {} class C {} my $obj = C.new; my $r = R; $obj but $r[1]; =output No appropriate parametric role variant available for 'R' in any specialize at gen/moar/m-Metamodel.nqp line 2609 in any compose at gen/moar/m-Metamodel.nqp line 2988 in any make_pun at gen/moar/m-Metamodel.nqp line 1692 in any find_method at gen/moar/m-Metamodel.nqp line 1720 in block <unit> at test.pl line 11
Download (untitled) / with headers
text/plain 545b
Still present: zoffix@VirtualBox:/tmp/tmp.9WzczD5eHY$ perl6 -v This is Rakudo version 2016.06-154-g55c359e built on MoarVM version 2016.06-9-g8fc21d5 implementing Perl 6.c. zoffix@VirtualBox:/tmp/tmp.9WzczD5eHY$ 6f foo.p6 No appropriate parametric role variant available for 'R' in any specialize at gen/moar/m-Metamodel.nqp line 2614 in any compose at gen/moar/m-Metamodel.nqp line 2993 in any make_pun at gen/moar/m-Metamodel.nqp line 1701 in any find_method at gen/moar/m-Metamodel.nqp line 1729 in block <unit> at foo.p6 line 10


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at perl.org