@@ -2443,7 +2443,7 @@ class TypeComparer(@constructorOnly initctx: Context) extends ConstraintHandling
2443
2443
decompose(cls2, tp2).forall(x => provablyDisjoint(x, tp1))
2444
2444
else
2445
2445
false
2446
- case (AppliedType (tycon1, args1), AppliedType (tycon2, args2)) if tycon1 == tycon2 =>
2446
+ case (AppliedType (tycon1, args1), AppliedType (tycon2, args2)) if isSame( tycon1, tycon2) =>
2447
2447
// It is possible to conclude that two types applies are disjoint by
2448
2448
// looking at covariant type parameters if the said type parameters
2449
2449
// are disjoin and correspond to fields.
@@ -2507,6 +2507,10 @@ class TypeComparer(@constructorOnly initctx: Context) extends ConstraintHandling
2507
2507
case (_, tp2 : AndType ) =>
2508
2508
! (tp2 <:< tp1)
2509
2509
&& (provablyDisjoint(tp1, tp2.tp2) || provablyDisjoint(tp1, tp2.tp1))
2510
+ case (tp1 : Type , tp2 : Type ) if defn.isTupleType(tp1) =>
2511
+ provablyDisjoint(tp1.toNestedPairs, tp2)
2512
+ case (tp1 : Type , tp2 : Type ) if defn.isTupleType(tp2) =>
2513
+ provablyDisjoint(tp1, tp2.toNestedPairs)
2510
2514
case (tp1 : TypeProxy , tp2 : TypeProxy ) =>
2511
2515
provablyDisjoint(tp1.underlying, tp2) || provablyDisjoint(tp1, tp2.underlying)
2512
2516
case (tp1 : TypeProxy , _) =>
0 commit comments