@@ -1112,7 +1112,7 @@ class TypeComparer(@constructorOnly initctx: Context) extends ConstraintHandling
11121112 if tycon1sym == tycon2sym && tycon1sym.isAliasType then
11131113 val preConstraint = constraint
11141114 isSubArgs(args1, args2, tp1, tparams)
1115- && tryAlso(preConstraint, recur(tp1.superType , tp2.superType ))
1115+ && tryAlso(preConstraint, recur(tp1.superTypeNormalized , tp2.superTypeNormalized ))
11161116 else
11171117 isSubArgs(args1, args2, tp1, tparams)
11181118 }
@@ -1177,7 +1177,7 @@ class TypeComparer(@constructorOnly initctx: Context) extends ConstraintHandling
11771177 */
11781178 def compareLower (tycon2bounds : TypeBounds , tyconIsTypeRef : Boolean ): Boolean =
11791179 if ((tycon2bounds.lo `eq` tycon2bounds.hi) && ! tycon2bounds.isInstanceOf [MatchAlias ])
1180- if (tyconIsTypeRef) recur(tp1, tp2.superType )
1180+ if (tyconIsTypeRef) recur(tp1, tp2.superTypeNormalized )
11811181 else isSubApproxHi(tp1, tycon2bounds.lo.applyIfParameterized(args2))
11821182 else
11831183 fallback(tycon2bounds.lo)
@@ -1249,11 +1249,11 @@ class TypeComparer(@constructorOnly initctx: Context) extends ConstraintHandling
12491249
12501250 ! sym.isClass && {
12511251 defn.isCompiletimeAppliedType(sym) && compareCompiletimeAppliedType(tp1, tp2, fromBelow = false ) ||
1252- recur(tp1.superType , tp2) ||
1252+ recur(tp1.superTypeNormalized , tp2) ||
12531253 tryLiftedToThis1
12541254 }|| byGadtBounds
12551255 case tycon1 : TypeProxy =>
1256- recur(tp1.superType , tp2)
1256+ recur(tp1.superTypeNormalized , tp2)
12571257 case _ =>
12581258 false
12591259 }
@@ -2645,9 +2645,11 @@ class TypeComparer(@constructorOnly initctx: Context) extends ConstraintHandling
26452645 ! (tp2 <:< tp1)
26462646 && (provablyDisjoint(tp1, tp2.tp2) || provablyDisjoint(tp1, tp2.tp1))
26472647 case (tp1 : NamedType , _) if gadtBounds(tp1.symbol) != null =>
2648- provablyDisjoint(gadtBounds(tp1.symbol).uncheckedNN.hi, tp2) || provablyDisjoint(tp1.superType, tp2)
2648+ provablyDisjoint(gadtBounds(tp1.symbol).uncheckedNN.hi, tp2)
2649+ || provablyDisjoint(tp1.superTypeNormalized, tp2)
26492650 case (_, tp2 : NamedType ) if gadtBounds(tp2.symbol) != null =>
2650- provablyDisjoint(tp1, gadtBounds(tp2.symbol).uncheckedNN.hi) || provablyDisjoint(tp1, tp2.superType)
2651+ provablyDisjoint(tp1, gadtBounds(tp2.symbol).uncheckedNN.hi)
2652+ || provablyDisjoint(tp1, tp2.superTypeNormalized)
26512653 case (tp1 : TermRef , tp2 : TermRef ) if isEnumValueOrModule(tp1) && isEnumValueOrModule(tp2) =>
26522654 tp1.termSymbol != tp2.termSymbol
26532655 case (tp1 : TermRef , tp2 : TypeRef ) if isEnumValue(tp1) =>
@@ -2663,11 +2665,11 @@ class TypeComparer(@constructorOnly initctx: Context) extends ConstraintHandling
26632665 case (tp1 : Type , tp2 : Type ) if defn.isTupleNType(tp2) =>
26642666 provablyDisjoint(tp1, tp2.toNestedPairs)
26652667 case (tp1 : TypeProxy , tp2 : TypeProxy ) =>
2666- provablyDisjoint(tp1.superType , tp2) || provablyDisjoint(tp1, tp2.superType )
2668+ provablyDisjoint(tp1.superTypeNormalized , tp2) || provablyDisjoint(tp1, tp2.superTypeNormalized )
26672669 case (tp1 : TypeProxy , _) =>
2668- provablyDisjoint(tp1.superType , tp2)
2670+ provablyDisjoint(tp1.superTypeNormalized , tp2)
26692671 case (_, tp2 : TypeProxy ) =>
2670- provablyDisjoint(tp1, tp2.superType )
2672+ provablyDisjoint(tp1, tp2.superTypeNormalized )
26712673 case _ =>
26722674 false
26732675 }
0 commit comments