New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
can not pop state anonymous array with repetition operator #3132
Comments
From @grondiluThis is perl6 version 2013.04-57-gb1695cf built on parrot 5.2.0 my @a = ^3; Returns: Expected: |
From @skidsThe array does not have to be anonymous: $ perl6 -e 'my @a = 1,2,3; say (state @b = @a).pop xx 2; say @a;' Actually thrown at: Other fun things that either work or do not: $ perl6 -e 'my @a = 1,2,3; say (state @b = @a).pop for 1,1; say @a;' Actually thrown at: $ perl6 -e 'my @a = 1,2,3; (say (state @b = @a).pop) for 1,1; say @a;' Actually thrown at: $ perl6 -e 'my @a = 1,2,3; my @b; say ((once @b = @a) // @b).pop xx 2; say @a;' Actually thrown at: $ perl6 -e 'my @a = 1,2,3; my @b; (say ((once @b = @a) // @b).pop) for 1,1; say @a;' Actually thrown at: $ perl6 -e 'my @a = 1,2,3; my @b; for 1,1 { say ((once @b = @a) // @b).pop }; say @a;' $ perl6 -e 'my @a = 1,2,3; repeat { say (state @b = @a).pop } until $++; say @a;' # Weird $ perl6 -e 'my @a = 1,2,3; repeat { say (state @b = @a).pop } until $++; say @a;' # Yes, indeed, weird |
The RT System itself - Status changed from 'new' to 'open' |
Migrated from rt.perl.org#117975 (status was 'open')
Searchable as RT117975$
The text was updated successfully, but these errors were encountered: