# New Ticket Created by Mathieu Gagnon # Please include the string: [perl #128324] # in the subject line of all future correspondence about this issue. # <URL: https://rt.perl.org/Ticket/Display.html?id=128324 >
Hello, $ perl6 --version This is Rakudo version 2016.04 built on MoarVM version 2016.04 implementing Perl 6.c. Reading http://doc.perl6.org/language/classtut suggests that the dot twigil provides read-only access to the attribute. But it is possible to change Array and Hash: $ perl6 -e 'class A { has $.wut = [] }; my $a = A.new; $a.wut = [1,2,3]; dd $a;' A $a = A.new(wut => $[1, 2, 3]) I was expecting something like 'Cannot modify an immutable Array' $ perl6 -e 'class A { has $.wut = set() }; my $a = A.new; $a.wut = set(1,2,3); dd $a;' Cannot modify an immutable Set in block <unit> at -e line 1