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

Owner: Nobody
Requestors: bri [at]

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

Subject: Failure to protect read-onlyness of some container types in attributes (regression)
Note that star needs to use EnumMap to test this, but the problem happened well after 2015.09. (09:58:41 AM) skids: star: class a { has EnumMap $.f = }; my $f =; $f.f.perl.say; $f.f = :a1, :b2; $f.f.perl.say (09:58:41 AM) camelia: star-m 2015.09: OUTPUT«␤Cannot assign to a readonly variable or a value␤ in block <unit> at /tmp/lpr91G4eaJ:1␤␤» (09:58:52 AM) skids: m: class a { has Map $.f = }; my $f =; $f.f.perl.say; $f.f = :a1, :b2; $f.f.perl.say (09:58:53 AM) camelia: rakudo-moar f93bab: OUTPUT«␤,:b2))␤» psch++ tracked this to the recent attribute inlining optimizations in rakudo fdd37a9 though there were NQP/MoarVM changes involved in that as well. Note also this, which is not related and also behaves this way on star: 10:05:11 AM) skids: m: my %f :=; %f = (:a1, :b2); %f.perl.say (10:05:11 AM) camelia: rakudo-moar f93bab: OUTPUT«,:b2))␤» This all fell out from a question asked by JRasPass++ here:
Download (untitled) / with headers
text/plain 213b
Still present in today's rakudo de5d9e: <Zoffix> m: my $o = class { has $.a = (:1a) }.new; say $o.a; $o.a = (:2b); say $o.a <camelia> rakudo-moar de5d9e: OUTPUT«␤␤»

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