We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent dd6782a commit 33d975dCopy full SHA for 33d975d
compiler/src/dotty/tools/dotc/transform/patmat/Space.scala
@@ -750,14 +750,10 @@ class SpaceEngine(implicit ctx: Context) extends SpaceLogic {
750
751
if (!redundancyCheckable(sel)) return
752
753
- val targetSpace = if (ctx.explicitNulls) {
754
- Typ(selTyp, true)
755
- } else {
756
- if (selTyp.classSymbol.isPrimitiveValueClass)
757
758
- else
759
- Or(Typ(selTyp, true) :: constantNullSpace :: Nil)
760
- }
+ val targetSpace =
+ if (ctx.explicitNulls) Typ(selTyp, true)
+ else if (selTyp.classSymbol.isPrimitiveValueClass) Typ(selTyp, true)
+ else Or(Typ(selTyp, true) :: constantNullSpace :: Nil)
761
762
// in redundancy check, take guard as false in order to soundly approximate
763
def projectPrevCases(cases: List[CaseDef]): Space =
0 commit comments