Skip to content

Commit c6b955c

Browse files
committed
Add failing test for a GLR regression
assignment of a Seq to an array slice dies with "This Seq has already been iterated"
1 parent 6c044ce commit c6b955c

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

S32-list/seq.t

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use v6;
22
use Test;
33

4-
plan 7;
4+
plan 8;
55

66
my @result = 1,2,3;
77

@@ -26,3 +26,10 @@ my ($y, @searches) = q:to/INPUT/, q:to/SEARCHES/.lines;
2626
is(@searches.elems, 1, "We didn't flatten the RHS because it's no single argument");
2727
is(@searches[0].WHAT, Seq, "Seq stayed intact");
2828
is-deeply @searches[0].Array, @expected-searches, 'seq => array works 3';
29+
30+
{
31+
my @n;
32+
@n[0, 1] = <a b>.sort;
33+
# bug found by the IRC::Utils test suite
34+
say @n.join('|'), 'a|b', 'can assign a Seq to an array slice';
35+
}

0 commit comments

Comments
 (0)