Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Add test for RT #98954
  • Loading branch information
usev6 committed Dec 13, 2014
1 parent 8bca161 commit 1ecd460
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion S02-types/nested_arrays.t
Expand Up @@ -10,7 +10,7 @@ Nested array tests; various interactions of arrayrefs, arrays, flattening and ne
=end description

plan 8;
plan 9;

{ # UNSPECCED
my @a = (1,2,[3,4]);
Expand All @@ -33,4 +33,12 @@ plan 8;
is(+$d, 4, 'Array object length, nested (), outer []s');
}

# RT #98954
{
my @a = [1], [2], [3];
is (map { @a[1 - $_][0] }, 0 .. 3).perl,
q[(2, 1, Failure.new(exception => X::Subscript::Negative.new(index => -1, type => Array)), Failure.new(exception => X::Subscript::Negative.new(index => -2, type => Array))).list],
'correct Failures for negative subscript of nested array';
}

# vim: ft=perl6

0 comments on commit 1ecd460

Please sign in to comment.