@@ -1112,7 +1112,7 @@ class TypeComparer(@constructorOnly initctx: Context) extends ConstraintHandling
1112
1112
if tycon1sym == tycon2sym && tycon1sym.isAliasType then
1113
1113
val preConstraint = constraint
1114
1114
isSubArgs(args1, args2, tp1, tparams)
1115
- && tryAlso(preConstraint, recur(tp1.superType , tp2.superType ))
1115
+ && tryAlso(preConstraint, recur(tp1.superTypeNormalized , tp2.superTypeNormalized ))
1116
1116
else
1117
1117
isSubArgs(args1, args2, tp1, tparams)
1118
1118
}
@@ -1177,7 +1177,7 @@ class TypeComparer(@constructorOnly initctx: Context) extends ConstraintHandling
1177
1177
*/
1178
1178
def compareLower (tycon2bounds : TypeBounds , tyconIsTypeRef : Boolean ): Boolean =
1179
1179
if ((tycon2bounds.lo `eq` tycon2bounds.hi) && ! tycon2bounds.isInstanceOf [MatchAlias ])
1180
- if (tyconIsTypeRef) recur(tp1, tp2.superType )
1180
+ if (tyconIsTypeRef) recur(tp1, tp2.superTypeNormalized )
1181
1181
else isSubApproxHi(tp1, tycon2bounds.lo.applyIfParameterized(args2))
1182
1182
else
1183
1183
fallback(tycon2bounds.lo)
@@ -1249,11 +1249,11 @@ class TypeComparer(@constructorOnly initctx: Context) extends ConstraintHandling
1249
1249
1250
1250
! sym.isClass && {
1251
1251
defn.isCompiletimeAppliedType(sym) && compareCompiletimeAppliedType(tp1, tp2, fromBelow = false ) ||
1252
- recur(tp1.superType , tp2) ||
1252
+ recur(tp1.superTypeNormalized , tp2) ||
1253
1253
tryLiftedToThis1
1254
1254
}|| byGadtBounds
1255
1255
case tycon1 : TypeProxy =>
1256
- recur(tp1.superType , tp2)
1256
+ recur(tp1.superTypeNormalized , tp2)
1257
1257
case _ =>
1258
1258
false
1259
1259
}
@@ -2645,9 +2645,11 @@ class TypeComparer(@constructorOnly initctx: Context) extends ConstraintHandling
2645
2645
! (tp2 <:< tp1)
2646
2646
&& (provablyDisjoint(tp1, tp2.tp2) || provablyDisjoint(tp1, tp2.tp1))
2647
2647
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)
2649
2650
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)
2651
2653
case (tp1 : TermRef , tp2 : TermRef ) if isEnumValueOrModule(tp1) && isEnumValueOrModule(tp2) =>
2652
2654
tp1.termSymbol != tp2.termSymbol
2653
2655
case (tp1 : TermRef , tp2 : TypeRef ) if isEnumValue(tp1) =>
@@ -2663,11 +2665,11 @@ class TypeComparer(@constructorOnly initctx: Context) extends ConstraintHandling
2663
2665
case (tp1 : Type , tp2 : Type ) if defn.isTupleNType(tp2) =>
2664
2666
provablyDisjoint(tp1, tp2.toNestedPairs)
2665
2667
case (tp1 : TypeProxy , tp2 : TypeProxy ) =>
2666
- provablyDisjoint(tp1.superType , tp2) || provablyDisjoint(tp1, tp2.superType )
2668
+ provablyDisjoint(tp1.superTypeNormalized , tp2) || provablyDisjoint(tp1, tp2.superTypeNormalized )
2667
2669
case (tp1 : TypeProxy , _) =>
2668
- provablyDisjoint(tp1.superType , tp2)
2670
+ provablyDisjoint(tp1.superTypeNormalized , tp2)
2669
2671
case (_, tp2 : TypeProxy ) =>
2670
- provablyDisjoint(tp1, tp2.superType )
2672
+ provablyDisjoint(tp1, tp2.superTypeNormalized )
2671
2673
case _ =>
2672
2674
false
2673
2675
}
0 commit comments