Skip to content

Commit 0083f21

Browse files
committed
Use correct hash/equality overrides for SkolemTypes
This should be the same as for TypeVar
1 parent d3cd133 commit 0083f21

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

compiler/src/dotty/tools/dotc/core/Types.scala

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4626,9 +4626,8 @@ object Types {
46264626
def derivedSkolemType(info: Type)(using Context): SkolemType =
46274627
if (info eq this.info) this else SkolemType(info)
46284628

4629-
override def computeHash(bs: Binders): Int = System.identityHashCode(this)
4630-
override def eql(that: Type): Boolean = this eq that
4631-
4629+
override def computeHash(bs: Binders): Int = identityHash(bs)
4630+
override def equals(that: Any): Boolean = this.eq(that.asInstanceOf[AnyRef])
46324631

46334632
def withName(name: Name): this.type = { myRepr = name; this }
46344633

0 commit comments

Comments
 (0)