File tree 1 file changed +4
-3
lines changed
compiler/src/dotty/tools/dotc/core
1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -2564,9 +2564,10 @@ class TypeComparer(@constructorOnly initctx: Context) extends ConstraintHandling
2564
2564
// of classes.
2565
2565
true
2566
2566
else if (isDecomposable(cls1))
2567
- // At this point, !cls1.derivesFrom(cls2): we know that `cls1`
2568
- // is disjoint from `tp2`. Therefore, we can safely decompose
2569
- // `cls1` using `.children`, even if `cls1` is non abstract.
2567
+ // At this point, !cls1.derivesFrom(cls2): we know that direct
2568
+ // instantiations of `cls1` (terms of the form `new cls1`) are not
2569
+ // of type `tp2`. Therefore, we can safely decompose `cls1` using
2570
+ // `.children`, even if `cls1` is non abstract.
2570
2571
decompose(cls1, tp1).forall(x => provablyDisjoint(x, tp2))
2571
2572
else if (isDecomposable(cls2))
2572
2573
decompose(cls2, tp2).forall(x => provablyDisjoint(x, tp1))
You can’t perform that action at this time.
0 commit comments