@@ -2449,8 +2449,7 @@ class TypeComparer(@constructorOnly initctx: Context) extends ConstraintHandling
2449
2449
decompose(cls2, tp2).forall(x => provablyDisjoint(x, tp1))
2450
2450
else
2451
2451
false
2452
- case (AppliedType (tycon1, args1), AppliedType (tycon2, args2))
2453
- if tycon1.typeSymbol == tycon2.typeSymbol && tycon1 =:= tycon2 =>
2452
+ case (AppliedType (tycon1, args1), AppliedType (tycon2, args2)) if isSame(tycon1, tycon2) =>
2454
2453
// It is possible to conclude that two types applies are disjoint by
2455
2454
// looking at covariant type parameters if the said type parameters
2456
2455
// are disjoin and correspond to fields.
@@ -2520,6 +2519,10 @@ class TypeComparer(@constructorOnly initctx: Context) extends ConstraintHandling
2520
2519
provablyDisjoint(tp1, gadtBounds(tp2.symbol).hi) || provablyDisjoint(tp1, tp2.superType)
2521
2520
case (tp1 : TermRef , tp2 : TermRef ) if isEnumValueOrModule(tp1) && isEnumValueOrModule(tp2) =>
2522
2521
tp1.termSymbol != tp2.termSymbol
2522
+ case (tp1 : Type , tp2 : Type ) if defn.isTupleType(tp1) =>
2523
+ provablyDisjoint(tp1.toNestedPairs, tp2)
2524
+ case (tp1 : Type , tp2 : Type ) if defn.isTupleType(tp2) =>
2525
+ provablyDisjoint(tp1, tp2.toNestedPairs)
2523
2526
case (tp1 : TypeProxy , tp2 : TypeProxy ) =>
2524
2527
provablyDisjoint(tp1.superType, tp2) || provablyDisjoint(tp1, tp2.superType)
2525
2528
case (tp1 : TypeProxy , _) =>
0 commit comments