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 f46c030 commit 42a3375Copy full SHA for 42a3375
compiler/src/dotty/tools/dotc/typer/Typer.scala
@@ -1364,7 +1364,7 @@ class Typer extends Namer
1364
tree.selector.removeAttachment(desugar.CheckIrrefutable) match {
1365
case Some(checkMode) =>
1366
val isPatDef = checkMode == desugar.MatchCheck.IrrefutablePatDef
1367
- if (!checkIrrefutable(pat, sel.tpe, isPatDef) && ctx.settings.migration.value)
+ if (!checkIrrefutable(pat, sel.tpe, isPatDef) && sourceVersion == `3.1-migration`)
1368
if (isPatDef) patch(Span(pat.span.end), ": @unchecked")
1369
else patch(Span(pat.span.start), "case ")
1370
case _ =>
0 commit comments