# New Ticket Created by "Carl Mäsak" # Please include the string: [perl #62184] # in the subject line of all future correspondence about this issue. # <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=62184 >
Rakudo r35404 doesn't work according to spec in the area of 'state' variables and cloned blocks. $ perl6 -e 'my $i = 0; my $func = { state $x = $i++; say $x }; my ($a, $b) = $func.clone, $func.clone; $a(); $b(); $a()' 0 1 2 According to S04, this should be equivalent to $func = { state $x will start { $x = $i++ }; say $i }; and thus (in my understanding) produce 0 1 1