Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[perl #117975] [BUG] can not pop state anonymous array with repetition operator

2 views
Skip to first unread message

grondilu @ yahoo . fr

unread,
May 12, 2013, 11:54:56 AM5/12/13
to bugs-bi...@rt.perl.org
# New Ticket Created by gron...@yahoo.fr
# Please include the string: [perl #117975]
# in the subject line of all future correspondence about this issue.
# <URL: https://rt.perl.org:443/rt3/Ticket/Display.html?id=117975 >


This is perl6 version 2013.04-57-gb1695cf built on parrot 5.2.0
revision RELEASE_5_2_0

my @a = ^3;
say (state@ = @a).pop xx 2;
say @a;

Returns:
OUTPUT«Element popped from empty list␤ in method Str at
src/gen/CORE.setting:10021␤ in method Str at src/gen/CORE.setting:876␤ in method Stringy at
src/gen/CORE.setting:885␤ in method join at src/gen/CORE.setting:1375␤ in method Str at
src/gen/CORE.setting:5969␤ in …

Expected:
2 1
0 1 2
0 new messages