Skip to content

Commit 33d975d

Browse files
committed
Cosmetic fix in Space
1 parent dd6782a commit 33d975d

File tree

1 file changed

+4
-8
lines changed
  • compiler/src/dotty/tools/dotc/transform/patmat

1 file changed

+4
-8
lines changed

compiler/src/dotty/tools/dotc/transform/patmat/Space.scala

+4-8
Original file line numberDiff line numberDiff line change
@@ -750,14 +750,10 @@ class SpaceEngine(implicit ctx: Context) extends SpaceLogic {
750750

751751
if (!redundancyCheckable(sel)) return
752752

753-
val targetSpace = if (ctx.explicitNulls) {
754-
Typ(selTyp, true)
755-
} else {
756-
if (selTyp.classSymbol.isPrimitiveValueClass)
757-
Typ(selTyp, true)
758-
else
759-
Or(Typ(selTyp, true) :: constantNullSpace :: Nil)
760-
}
753+
val targetSpace =
754+
if (ctx.explicitNulls) Typ(selTyp, true)
755+
else if (selTyp.classSymbol.isPrimitiveValueClass) Typ(selTyp, true)
756+
else Or(Typ(selTyp, true) :: constantNullSpace :: Nil)
761757

762758
// in redundancy check, take guard as false in order to soundly approximate
763759
def projectPrevCases(cases: List[CaseDef]): Space =

0 commit comments

Comments
 (0)