Merge pull request #17458 from piyush0411/Fix17457
[contributed by @piyush0411, reviewed by me]
Tested with the following input.
use List; var l: list(int); writeln(l.indexOf(3));
The output comes out to be
-1, as required.
[editor: approach was simply to check for
size == 0 lists before doing any OOB checks; this PR also adds a test locking in the new behavior]
Modified Files: A test/library/standard/List/indexOf/listIndexOfEmptyList.chpl