summaryrefslogtreecommitdiff
path: root/src/library/scala/collection/SeqViewLike.scala
diff options
context:
space:
mode:
Diffstat (limited to 'src/library/scala/collection/SeqViewLike.scala')
-rw-r--r--src/library/scala/collection/SeqViewLike.scala1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/library/scala/collection/SeqViewLike.scala b/src/library/scala/collection/SeqViewLike.scala
index e719f19c78..ef6d2272cb 100644
--- a/src/library/scala/collection/SeqViewLike.scala
+++ b/src/library/scala/collection/SeqViewLike.scala
@@ -83,6 +83,7 @@ trait SeqViewLike[+A,
}
def length = index(self.length)
def apply(idx: Int) = {
+ if (idx < 0 || idx >= self.length) throw new IndexOutOfBoundsException(idx.toString)
val row = findRow(idx, 0, self.length - 1)
mapping(self(row)).seq.toSeq(idx - index(row))
}