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 following prints an incrementing count (expected):
`my $x = do { while ( 1 ) { state $a++; say $a; }; }; say $x;`
`do while ( 1 ) { state $a++; say $a; }; say $x;`
The following only prints `1`s (expected incrementing count):
`my $x = do while ( 1 ) state $a++; say $a; }; }; say $x;`
When `do` does not use braces it works as expected unless its also used in assignment.
When `do` does use braces it always works as expected.
Migrated from rt.perl.org#127422 (status was 'open')
Searchable as RT127422$
The text was updated successfully, but these errors were encountered: