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

Owner: Nobody
Requestors: curt [at]

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

From: Curt Tilmes <curt [...]>
Subject: Typed Array assignment type check fails sometimes
Date: Sat, 16 Dec 2017 14:34:39 -0500
To: rakudobug [...]
Download (untitled) / with headers
text/plain 763b
Under these exact circumstances, I reliably get an error.  (Including the inclusion of the un-neccesary module.  If I change anything, it works fine.)

~/testing$ perl6 -v
This is Rakudo Star version 2017.10 built on MoarVM version 2017.10
implementing Perl 6.c.

~/testing$ cat Testit.pm6 
class AnotherTestClass
    has Str @.something;

~/testing$ cat Testmod.pm6 
class MyTestClass
    has Array[Str] $.list;

~/testing$ cat testit.p6 
use Testit;
use Testmod; => Array[Str].new('this'));

~/testing$ perl6 -I . testit.p6 
Type check failed in assignment to $!list; expected Array[Str] but got Array[Str].new("this")
  in submethod BUILDALL at /home/ctilmes/testing/Testmod.pm6 (Testmod) line 1
  in block <unit> at testit.p6 line 4

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

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