Skip to content

Commit e28702a

Browse files
committed
Test for RT #124316.
1 parent dce936b commit e28702a

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

S03-operators/assign.t

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use Test;
66
# V
77
# L<S03/Changes to Perl 5 operators/list assignment operator now parses on the right>
88

9-
plan 294;
9+
plan 295;
1010

1111

1212
# tests various assignment styles
@@ -982,4 +982,11 @@ sub l () { 1, 2 };
982982
is @foo, '5 10', 'Internal chained item assignment does not mess up outer list assignment';
983983
}
984984

985+
# RT #124316
986+
{
987+
my @a;
988+
@a[^2] = 42,43;
989+
is @a, [42,43], '@a[^2] on empty array vivifies the slots and assignment works';
990+
}
991+
985992
# vim: ft=perl6

0 commit comments

Comments
 (0)