File tree 1 file changed +3
-6
lines changed
compiler/src/dotty/tools/dotc/transform/patmat
1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -510,10 +510,7 @@ class SpaceEngine(implicit ctx: Context) extends SpaceLogic {
510
510
// convert top-level type shape into "conjunctive normal form"
511
511
def cnf (tp : Type ): Type = tp match {
512
512
case AndType (OrType (l, r), tp) =>
513
- val tp1 = cnf(tp)
514
- val l1 = cnf(l)
515
- val r1 = cnf(r)
516
- OrType (cnf(AndType (l1, tp1)), cnf(AndType (r1, tp1)))
513
+ OrType (cnf(AndType (l, tp)), cnf(AndType (r, tp)))
517
514
case AndType (tp, o : OrType ) =>
518
515
cnf(AndType (o, tp))
519
516
case AndType (l, r) =>
@@ -533,9 +530,9 @@ class SpaceEngine(implicit ctx: Context) extends SpaceLogic {
533
530
val tp1 = tp.derivedRefinedType(parent1, refinedName = tp.refinedName, refinedInfo = tp.refinedInfo)
534
531
535
532
if (parent1.ne(tp.parent)) cnf(tp1) else tp1
536
- case tp : TypeAlias =>
533
+ case tp : TypeAlias =>
537
534
cnf(tp.alias)
538
- case _ =>
535
+ case _ =>
539
536
tp
540
537
}
541
538
You can’t perform that action at this time.
0 commit comments