diff options
-rw-r--r-- | src/library/scala/collection/generic/SequenceTemplate.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/library/scala/collection/generic/SequenceTemplate.scala b/src/library/scala/collection/generic/SequenceTemplate.scala index ee0f94a583..ecc65ebf15 100644 --- a/src/library/scala/collection/generic/SequenceTemplate.scala +++ b/src/library/scala/collection/generic/SequenceTemplate.scala @@ -320,7 +320,7 @@ trait SequenceTemplate[+A, +This <: IterableTemplate[A, This] with Sequence[A]] def indexOfSeq[B >: A](that: Sequence[B]): Int = indexOfSeq(that, 0) def indexOfSeq[B >: A](that: Sequence[B], fromIndex: Int): Int = - if (that.hasDefiniteSize) + if (thisCollection.hasDefiniteSize && that.hasDefiniteSize) indexOf_KMP(thisCollection, 0, length, that, 0, that.length, fromIndex) else { var i = fromIndex |