# New Ticket Created by Elizabeth Mattijsen # Please include the string: [perl #126585] # in the subject line of all future correspondence about this issue. # <URL: https://rt.perl.org/Ticket/Display.html?id=126585 >
[21:55:53] <lizmat> m: sub a($x is rw) { $x; }; a 42 # dies as expected [21:55:54] <+camelia> rakudo-moar 8b834c: OUTPUT«Parameter '$x' expected a writable container, but got Int value in sub a at /tmp/2NK1Hbv1Ub:1 in block <unit> at /tmp/2NK1Hbv1Ub:1» [21:56:11] <lizmat> m: sub a($x is rw) { $x; }; { a 42 }() # but not if within a block ? [21:56:11] <+camelia> rakudo-moar 8b834c: ( no output ) [21:58:08] <lizmat> m: sub a($x is rw) { $x; }; { a 42 } # seems to be optimizer related [21:58:08] <+camelia> rakudo-moar 8b834c: ( no output ) [21:58:19] <lizmat> $ perl6 --optimize=off -e 'sub a($x is rw) { $x }; { a 42 }' [21:58:19] <lizmat> Parameter '$x' expected a writable container, but got Int value