diff --git a/compiler/src/dotty/tools/dotc/core/Types.scala b/compiler/src/dotty/tools/dotc/core/Types.scala index ce7e93b51989..49894323ddf4 100644 --- a/compiler/src/dotty/tools/dotc/core/Types.scala +++ b/compiler/src/dotty/tools/dotc/core/Types.scala @@ -4621,11 +4621,12 @@ object Types { * Note that care is needed when creating them, since not all types need to be inhabited. * A skolem is equal to itself and no other type. */ - case class SkolemType(info: Type) extends UncachedProxyType with ValueType with SingletonType { + case class SkolemType(info: Type) extends CachedProxyType with ValueType with SingletonType { override def underlying(using Context): Type = info def derivedSkolemType(info: Type)(using Context): SkolemType = if (info eq this.info) this else SkolemType(info) - override def hashCode: Int = System.identityHashCode(this) + + override def computeHash(bs: Binders): Int = identityHash(bs) override def equals(that: Any): Boolean = this.eq(that.asInstanceOf[AnyRef]) def withName(name: Name): this.type = { myRepr = name; this }