Skip to content

Commit 42a3375

Browse files
committed
Activate unchecked match rewrite for 3.1-migration
1 parent f46c030 commit 42a3375

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/src/dotty/tools/dotc/typer/Typer.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1364,7 +1364,7 @@ class Typer extends Namer
13641364
tree.selector.removeAttachment(desugar.CheckIrrefutable) match {
13651365
case Some(checkMode) =>
13661366
val isPatDef = checkMode == desugar.MatchCheck.IrrefutablePatDef
1367-
if (!checkIrrefutable(pat, sel.tpe, isPatDef) && ctx.settings.migration.value)
1367+
if (!checkIrrefutable(pat, sel.tpe, isPatDef) && sourceVersion == `3.1-migration`)
13681368
if (isPatDef) patch(Span(pat.span.end), ": @unchecked")
13691369
else patch(Span(pat.span.start), "case ")
13701370
case _ =>

0 commit comments

Comments
 (0)