Skip to content

Commit a1bcc18

Browse files
committed
array-indexing a hash with a negative index is Failure, RT 77598
1 parent 6dff118 commit a1bcc18

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

S02-types/hash.t

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use v6;
22

33
use Test;
44

5-
plan 80;
5+
plan 81;
66

77
# basic lvalue assignment
88
# L<S09/Hashes>
@@ -296,6 +296,11 @@ eval_lives_ok('my $rt75694 = { has-b => 42 }', "can have a bareword key starting
296296
is $h<a>, 5, 'can normally modify items created from Hash.new';
297297
}
298298

299+
# RT 77598
300+
{
301+
is {}[-1], Failure, 'array-indexing a hash with a negative index is Failure';
302+
}
303+
299304
done;
300305

301306
# vim: ft=perl6

0 commit comments

Comments
 (0)