diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/library/scala/collection/generic/SequenceTemplate.scala | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/library/scala/collection/generic/SequenceTemplate.scala b/src/library/scala/collection/generic/SequenceTemplate.scala index b9a398b68c..ba949152bd 100644 --- a/src/library/scala/collection/generic/SequenceTemplate.scala +++ b/src/library/scala/collection/generic/SequenceTemplate.scala @@ -479,7 +479,10 @@ trait SequenceTemplate[+A, +This <: IterableTemplate[A, This] with Sequence[A]] case that1: Sequence[a] => val these = this.iterator val those = that1.iterator - while (these.hasNext && those.hasNext && these.next() == those.next()) {} + while (these.hasNext && those.hasNext) + if (these.next() != those.next()) + return false + !these.hasNext && !those.hasNext case _ => false |