# New Ticket Created by 宋文泰 # Please include the string: [perl #126176] # in the subject line of all future correspondence about this issue. # <URL: https://rt.perl.org/Ticket/Display.html?id=126176 >
``` perl6 code
my $lastval = 4;
sub lastval () is rw { return $lastval }
dd $lastval;
lastval() = 5;
dd $lastval;
```
Int $lastval = 4
Cannot assign to a readonly variable or a value
in block at t3.p6:7
This is perl6 version 2015.09-115-g4653d98 built on MoarVM version
2015.09-36-g51dcbe4
