Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.0.6
-
None
-
None
Description
Basically, this is an inconsistency of List#getAt(Collection). When its parameters are integer indexes and non-empty ranges, it works as expected. But when an EmptyRange is passed to it, it doesn't behave like List#getAt(EmptyRange):
def list = [1, 2, 3] assert list[3..<3] == [] // This works assert list[0, 2..<3] == [1, 3] // This works too assert list[0, 3..<3] == [1] // But this throws IndexOutOfBoundsException: toIndex = 4