Skip to content

Commit 1c61263

Browse files
committed
Test .List on uninited shaped arrays does not die
RT#130513: https://rt.perl.org/Ticket/Display.html?id=130513
1 parent 890ca31 commit 1c61263

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

S02-types/array-shapes.t

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use v6;
22
use Test;
3-
plan 27;
3+
plan 28;
44

55
# L<S09/Fixed-size arrays>
66

@@ -105,3 +105,13 @@ plan 27;
105105
throws-like 'my @a[-9223372036854775808,-2]',
106106
X::IllegalDimensionInShape;
107107
}
108+
109+
# RT #130513
110+
subtest '.List on uninited shaped array' => {
111+
plan 2;
112+
113+
my @a[2;2];
114+
my @result;
115+
lives-ok { @result = @a.List }, 'does not die';
116+
is-deeply @result, [Any xx 4], 'gives correct results';
117+
}

0 commit comments

Comments
 (0)