Skip to content

Commit fe7d2c1

Browse files
committed
Fix regression in SortedSet.==
Regressed in scala/scala#8876
1 parent 3ead93a commit fe7d2c1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

library/src/scala/collection/immutable/SortedSet.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ trait SortedSet[A] extends Set[A] with scala.collection.SortedSet[A] with Sorted
3131

3232
override def equals(that: Any): Boolean = that match {
3333
case _ if this eq that.asInstanceOf[AnyRef] => true
34-
case ss: SortedSet[_] =>
34+
case ss: SortedSet[_] if ss.ordering == this.ordering =>
3535
(ss canEqual this) &&
3636
(this.size == ss.size) && {
3737
val i1 = this.iterator

0 commit comments

Comments
 (0)