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 4b812e3 commit 0a8f763Copy full SHA for 0a8f763
compiler/src/dotty/tools/dotc/typer/Typer.scala
@@ -1829,7 +1829,7 @@ class Typer(@constructorOnly nestingLevel: Int = 0) extends Namer
1829
// TODO: move the check above to patternMatcher phase
1830
val uncheckedTpe = AnnotatedType(sel.tpe.widen, Annotation(defn.UncheckedAnnot, tree.selector.span))
1831
tpd.cpy.Match(result)(
1832
- selector = tpd.Typed(sel, tpd.TypeTree(uncheckedTpe)),
+ selector = tpd.Typed(sel, new tpd.InferredTypeTree().withType(uncheckedTpe)),
1833
cases = result.cases
1834
)
1835
case _ =>
0 commit comments