Defined-or operator lets negative subscript cause a crash #2788
Labels
BLOCKER
Preventing the next release of rakudo, or just needing attention before the release
regression
Issue did not exist previously
tests needed
Issue is generally resolved but tests were not written yet
The Problem
Given:
my @a = 1..2 Z 'a'..'b';
These work as they should
say @a[ $_][ 1] // 42 for <0 -1>; # prints 'a' and '42'
say @a[*-1][$_] // 42 for <0 -1>; # prints '2' and '42'
But // fails to catch the negative subscript value (in the 1st dimension)
when subscripting with
*-1
(in the 2nd dimension)say @a[$_][*-1] // 42 for <0 -1>
;Fails with "Index out of range. Is: -1, should be in 0..^Inf"
Environment
Failure first seen with:
Rakudo version 2019.03-40-g4ffb4082b built on MoarVM version 2019.03-31-g6c7810ce7
The text was updated successfully, but these errors were encountered: