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

Owner: Nobody
Requestors: rightfold [at] gmail.com
Cc:
AdminCc:

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



From: rightfold <rightfold [...] gmail.com>
To: rakudobug <rakudobug [...] perl.org>
Date: Sat, 16 Jan 2016 23:24:39 +0100
Subject: [BUG] cannot bind private hash attribute with key type constraint
Download (untitled) / with headers
text/plain 515b
Consider the following code: class C { has %!h{Pair}; method m { %!h := %!h.clone; } } C.new.m; rather than succeeding, it fails with: Show quoted text
> Type check failed in binding; expected Associative[Any,Pair] but got Hash[Any,Pair] > in method m at /tmp/clone.p6 line 4 > in block <unit> at /tmp/clone.p6 line 9
Removing "{Pair}" from the code makes the code work, however. Rakudo version: Show quoted text
> This is Rakudo version 2015.12 built on MoarVM version 2015.12 implementing Perl 6.c.
Still present in Rakudo version 2016.07.1-88-g15ee3c3 built on MoarVM version 2016.07-11-g11e02fe


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