Skip to content

Commit 3e15796

Browse files
committed
Fix NamedPartsAccumulator
1 parent b74245f commit 3e15796

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1401,7 +1401,7 @@ object Types {
14011401

14021402
/** Equality used for hash-consing; uses `eq` on all recursive invocations.
14031403
*/
1404-
def eql(that: Type): Boolean = this.iso(that, null)
1404+
def eql(that: Type): Boolean = this.equals(that)
14051405

14061406
/** customized hash code of this type.
14071407
* NotCached for uncached types. Cached types
@@ -4282,8 +4282,8 @@ object Types {
42824282
(implicit ctx: Context) extends TypeAccumulator[mutable.Set[NamedType]] {
42834283
override def stopAtStatic = false
42844284
def maybeAdd(x: mutable.Set[NamedType], tp: NamedType) = if (p(tp)) x += tp else x
4285-
val seen = new util.HashSet[Type](7) {
4286-
override def hash(x: Type): Int = x.hash
4285+
val seen = new util.HashSet[Type](64) {
4286+
override def hash(x: Type): Int = System.identityHashCode(x)
42874287
override def isEqual(x: Type, y: Type) = x.eq(y)
42884288
}
42894289
def apply(x: mutable.Set[NamedType], tp: Type): mutable.Set[NamedType] =

0 commit comments

Comments
 (0)