Skip to content

Commit

Permalink
Use correct hash/equality overrides for SkolemTypes
Browse files Browse the repository at this point in the history
This should be the same as for TypeVar
  • Loading branch information
odersky committed Apr 21, 2022
1 parent d3cd133 commit 0083f21
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions compiler/src/dotty/tools/dotc/core/Types.scala
Original file line number Diff line number Diff line change
Expand Up @@ -4626,9 +4626,8 @@ object Types {
def derivedSkolemType(info: Type)(using Context): SkolemType =
if (info eq this.info) this else SkolemType(info)

override def computeHash(bs: Binders): Int = System.identityHashCode(this)
override def eql(that: Type): Boolean = this eq that

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 }

Expand Down

0 comments on commit 0083f21

Please sign in to comment.