Skip Menu |
Report information
Id: 125935
Status: open
Priority: 0/
Queue: perl6

Owner: Nobody
Requestors: masak <cmasak [at] gmail.com>
Cc:
AdminCc:

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



To: rakudobug [...] perl.org
Subject: [BUG] Cannot print a type captured copied into a variable in the parameter list of a role in Rakudo
From: Carl Mäsak <cmasak [...] gmail.com>
Date: Fri, 28 Aug 2015 19:09:40 +0200
Download (untitled) / with headers
text/plain 276b
<masak> m: role R[::N, $result = N] { say $result }; my $r = R[Int].new <camelia> rakudo-moar 5fb81f: OUTPUT«Cannot find method 'collisions' [...] * masak submits rakudobug Change 'say $result' to 'say N', and it works. Change '$result = N' to '$result = 4', and it works.
Still reproducible as described (2017.11,HEAD(e5b660e)), although with a slightly different error message:

Could not instantiate role 'R':
No such method 'gist' for invocant of type 'N'
  in any protect at gen/moar/stage2/NQPCORE.setting line 1039
  in block <unit> at -e line 1


On 2015-08-28 10:09:59, masak wrote:
Show quoted text
> <masak> m: role R[::N, $result = N] { say $result }; my $r = R[Int].new
> <camelia> rakudo-moar 5fb81f: OUTPUT«Cannot find method 'collisions' [...]
> * masak submits rakudobug
>
> Change 'say $result' to 'say N', and it works.
>
> Change '$result = N' to '$result = 4', and it works.




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