File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed
compiler/src/dotty/tools/dotc/typer Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -1396,7 +1396,7 @@ class Typer extends Namer
13961396
13971397 // skip exhaustivity check in later phase
13981398 // TODO: move the check above to patternMatcher phase
1399- val uncheckedTpe = AnnotatedType (sel.tpe, Annotation (defn.UncheckedAnnot ))
1399+ val uncheckedTpe = AnnotatedType (sel.tpe.widen , Annotation (defn.UncheckedAnnot ))
14001400 tpd.cpy.Match (result)(
14011401 selector = tpd.Typed (sel, tpd.TypeTree (uncheckedTpe)),
14021402 cases = result.cases
Original file line number Diff line number Diff line change 11object Test extends App {
22 val x : Int = 2 : @ unchecked
3- val (y1 : Some [Int ]) = Some (1 ): Option [Int ]: @ unchecked
3+ val (y1 : Some [Int ]) = Some (1 ): Option [Int ] @ unchecked
44
55 val a :: as = List (1 , 2 , 3 ): @ unchecked
66 val lst @ b :: bs = List (1 , 2 , 3 ): @ unchecked
You can’t perform that action at this time.
0 commit comments