# New Ticket Created by  Zoffix Znet 
# Please include the string:  [perl #129278]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/Ticket/Display.html?id=129278 >


#Doesn't work:
<TestNinja> m: class { has int $!n = 0; method x ($!n) {} }.new.x: 42
<camelia> rakudo-moar 2c95f7: OUTPUT«Cannot modify an immutable int␤  in method 
x at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»

# But does, if we use a temp var:
<TestNinja> m: class { has int $!n = 0; method x ($n) {$!n = $n} }.new.x: 42
<camelia> rakudo-moar 2c95f7: ( no output )

Reply via email to