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 4f775fa commit cb9fcd8Copy full SHA for cb9fcd8
compiler/src/dotty/tools/dotc/transform/patmat/Space.scala
@@ -941,6 +941,7 @@ object SpaceEngine {
941
val msg = if nullOnly then MatchCaseOnlyNullWarning() else MatchCaseUnreachable()
942
report.warning(msg, pat.srcPos)
943
944
+ // in redundancy check, take guard as false in order to soundly approximate
945
val newPrev = if guard.isEmpty then covered :: prevs else prevs
946
recur(rest, newPrev, Nil)
947
0 commit comments