Skip to content

Commit 9e2c8be

Browse files
committed
use nullType for simplicity
1 parent 6dad94d commit 9e2c8be

File tree

1 file changed

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

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -951,7 +951,7 @@ class SpaceEngine(implicit ctx: Context) extends SpaceLogic {
951951
// if last case is `_` and only matches `null`, produce a warning
952952
if (i == cases.length - 1 && !isNull(pat) ) {
953953
simplify(minus(covered, prevs)) match {
954-
case Typ(ConstantType(Constant(null)), _) =>
954+
case Typ(`nullType`, _) =>
955955
ctx.warning(MatchCaseOnlyNullWarning(), pat.pos)
956956
case _ =>
957957
}

0 commit comments

Comments
 (0)