Skip to content

Commit d8d3c5c

Browse files
committed
Use correct hash/equality overrides for SkolemTypes
This should be the same as for TypeVar
1 parent 3a2c947 commit d8d3c5c

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
@@ -4623,9 +4623,8 @@ object Types {
46234623
def derivedSkolemType(info: Type)(using Context): SkolemType =
46244624
if (info eq this.info) this else SkolemType(info)
46254625

4626-
override def computeHash(bs: Binders): Int = System.identityHashCode(this)
4627-
override def eql(that: Type): Boolean = this eq that
4628-
4626+
override def computeHash(bs: Binders): Int = identityHash(bs)
4627+
override def equals(that: Any): Boolean = this.eq(that.asInstanceOf[AnyRef])
46294628

46304629
def withName(name: Name): this.type = { myRepr = name; this }
46314630

0 commit comments

Comments
 (0)