You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The contents of state variables is not preserved when serializing closures.
Bug is present b3c92baad264146f9e7dd7308f3064c3d7e18be2 and has been
implemented this way.
### Foo.pm
use v6;
# works when you turn precompilation off
#no precompilation;
module Foo {
my $closure = BEGIN {
say("compiling");
my $c := -> {
state $foo = 100;
$foo++;
$foo;
};
$c();
$c();
$c();
$c;
}
sub foo is export {
$closure();
}
}
Migrated from rt.perl.org#129817 (status was 'new')
Searchable as RT129817$
The text was updated successfully, but these errors were encountered: