[SR-14931] Lazy collection wrappers allow indices out of range #57273
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
standard library
Area: Standard library umbrella
Additional Detail from JIRA
md5: 1cd1cb3a2909ef46413eb5bf3c508fbd
Issue Description:
Lazy collection wrappers such as
LazyFilterSequence
allow indexing into positions that are out of bound, as long as they're in bound for the base collection, and returns the element at the given position in the base collection.Example from a tweet by @ole:
The correct behaviour should be like that of slices:
The text was updated successfully, but these errors were encountered: