Skip to content

Commit 19a14c5

Browse files
committed
Fix NamedPartsAccumulator
1 parent 4b9d75c commit 19a14c5

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
@@ -1396,7 +1396,7 @@ object Types {
13961396

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

14011401
/** customized hash code of this type.
14021402
* NotCached for uncached types. Cached types
@@ -4273,8 +4273,8 @@ object Types {
42734273
(implicit ctx: Context) extends TypeAccumulator[mutable.Set[NamedType]] {
42744274
override def stopAtStatic = false
42754275
def maybeAdd(x: mutable.Set[NamedType], tp: NamedType) = if (p(tp)) x += tp else x
4276-
val seen = new util.HashSet[Type](7) {
4277-
override def hash(x: Type): Int = x.hash
4276+
val seen = new util.HashSet[Type](64) {
4277+
override def hash(x: Type): Int = System.identityHashCode(x)
42784278
override def isEqual(x: Type, y: Type) = x.eq(y)
42794279
}
42804280
def apply(x: mutable.Set[NamedType], tp: Type): mutable.Set[NamedType] =

0 commit comments

Comments
 (0)