summaryrefslogtreecommitdiff
path: root/src/library
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2011-01-29 18:35:53 +0000
committerPaul Phillips <paulp@improving.org>2011-01-29 18:35:53 +0000
commit80488e4218a0a72dec3ba727e6de276da87f1398 (patch)
tree74c0275dea23c90e2ba4c9558e8ff3c9bfb086a2 /src/library
parentcf492f472aa6d1154cd7336c37bab0b78125b872 (diff)
downloadscala-80488e4218a0a72dec3ba727e6de276da87f1398.tar.gz
scala-80488e4218a0a72dec3ba727e6de276da87f1398.tar.bz2
scala-80488e4218a0a72dec3ba727e6de276da87f1398.zip
Fixed bug in IndexedSeqOptimized.indexWhere suc...
Fixed bug in IndexedSeqOptimized.indexWhere such that the empty string would find things all over the place. Closes #4197, no review.
Diffstat (limited to 'src/library')
-rwxr-xr-xsrc/library/scala/collection/IndexedSeqOptimized.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/library/scala/collection/IndexedSeqOptimized.scala b/src/library/scala/collection/IndexedSeqOptimized.scala
index e95b6475de..0d95108235 100755
--- a/src/library/scala/collection/IndexedSeqOptimized.scala
+++ b/src/library/scala/collection/IndexedSeqOptimized.scala
@@ -190,7 +190,7 @@ trait IndexedSeqOptimized[+A, +Repr] extends IndexedSeqLike[A, Repr] { self =>
i - start
}
- private def negLength(n: Int) = if (n == length) -1 else n
+ private def negLength(n: Int) = if (n >= length) -1 else n
override /*SeqLike*/
def indexWhere(p: A => Boolean, from: Int): Int = {