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 7ed0041 commit f70b899Copy full SHA for f70b899
compiler/src/dotty/tools/dotc/typer/Typer.scala
@@ -1599,7 +1599,7 @@ class Typer(@constructorOnly nestingLevel: Int = 0) extends Namer
1599
result match {
1600
case result @ Match(sel, CaseDef(pat, _, _) :: _) =>
1601
tree.selector.removeAttachment(desugar.CheckIrrefutable) match {
1602
- case Some(checkMode) =>
+ case Some(checkMode) if !sel.tpe.hasAnnotation(defn.UncheckedAnnot) =>
1603
val isPatDef = checkMode == desugar.MatchCheck.IrrefutablePatDef
1604
if (!checkIrrefutable(sel, pat, isPatDef) && sourceVersion == `future-migration`)
1605
if (isPatDef) patch(Span(tree.selector.span.end), ": @unchecked")
0 commit comments