Skip to content

Commit 6118969

Browse files
oderskyDarkDimius
authored andcommitted
Make skolems uncached
There was no reason in the first case to cache them, as their equality is reference identity. Maybe this fixes the OOM errors we encounter.
1 parent ecfdf79 commit 6118969

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2494,11 +2494,11 @@ object Types {
24942494
// ----- Skolem types -----------------------------------------------
24952495

24962496
/** A skolem type reference with underlying type `binder`. */
2497-
abstract case class SkolemType(info: Type) extends CachedProxyType with ValueType with SingletonType {
2497+
abstract case class SkolemType(info: Type) extends UncachedProxyType with ValueType with SingletonType {
24982498
override def underlying(implicit ctx: Context) = info
24992499
def derivedSkolemType(info: Type)(implicit ctx: Context) =
25002500
if (info eq this.info) this else SkolemType(info)
2501-
override def computeHash: Int = identityHash
2501+
override def hashCode: Int = identityHash
25022502
override def equals(that: Any) = this eq that.asInstanceOf[AnyRef]
25032503
override def toString = s"Skolem($info)"
25042504
}

0 commit comments

Comments
 (0)