Skip to content

Commit aa8f21a

Browse files
authored
Merge pull request scala/scala#8977 from joroKr21/seq-is-defined
2 parents d6703be + 31d0546 commit aa8f21a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

library/src/scala/collection/Seq.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ trait SeqOps[+A, +CC[_], +C] extends Any
284284
* @param idx the index to test
285285
* @return `true` if this $coll contains an element at position `idx`, `false` otherwise.
286286
*/
287-
def isDefinedAt(idx: Int): Boolean = (idx >= 0) && (idx < length)
287+
def isDefinedAt(idx: Int): Boolean = idx >= 0 && lengthIs > idx
288288

289289
/** A copy of this $coll with an element value appended until a given target length is reached.
290290
*

0 commit comments

Comments
 (0)