We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6dad94d commit 9e2c8beCopy full SHA for 9e2c8be
compiler/src/dotty/tools/dotc/transform/patmat/Space.scala
@@ -951,7 +951,7 @@ class SpaceEngine(implicit ctx: Context) extends SpaceLogic {
951
// if last case is `_` and only matches `null`, produce a warning
952
if (i == cases.length - 1 && !isNull(pat) ) {
953
simplify(minus(covered, prevs)) match {
954
- case Typ(ConstantType(Constant(null)), _) =>
+ case Typ(`nullType`, _) =>
955
ctx.warning(MatchCaseOnlyNullWarning(), pat.pos)
956
case _ =>
957
}
0 commit comments