# New Ticket Created by Elizabeth Mattijsen # Please include the string: [perl #126120] # in the subject line of all future correspondence about this issue. # <URL: https://rt.perl.org/Ticket/Display.html?id=126120 >
[19:22:03] <lizmat> m: role R { has int $!a }; class A does R { method a() { $!a = 42 } }; say A.new.a # sigh [19:22:03] <+camelia> rakudo-moar 97e47a: OUTPUT«Cannot assign to an immutable value in method a at /tmp/xjfoxVcXDh:1 in block <unit> at /tmp/xjfoxVcXDh:1» [19:22:25] <lizmat> m: role R { has Int $!a }; class A does R { method a() { $!a = 42 } }; say A.new.a # works fine if it is not a native [19:22:25] <+camelia> rakudo-moar 97e47a: OUTPUT«42»