diff --git a/S02-types/array.t b/S02-types/array.t index d092d4f11b..5b2e3f19ae 100644 --- a/S02-types/array.t +++ b/S02-types/array.t @@ -2,7 +2,7 @@ use v6; use Test; -plan 91; +plan 93; #L @@ -335,6 +335,15 @@ my @array2 = ("test", 1, Mu); ok Array(1,2,3) eqv [1,2,3], 'Array(1,2,3) makes correct array'; } +# RT 73184 +{ + my @a = 0..*; + try { @a[ Inf ] = 3 }; + ok "$!" ~~ /'type cannot unbox to a native integer'/, 'cannot use Inf index to assign element in infinite array'; + try { @a[ Inf ].say }; + ok "$!" ~~ /'type cannot unbox to a native integer'/, 'cannot use Inf index to access element in infinite array'; +} + done; # vim: ft=perl6