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
1396
1396
1397
1397
// skip exhaustivity check in later phase
1398
1398
// 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 ))
1400
1400
tpd.cpy.Match (result)(
1401
1401
selector = tpd.Typed (sel, tpd.TypeTree (uncheckedTpe)),
1402
1402
cases = result.cases
Original file line number Diff line number Diff line change 1
1
object Test extends App {
2
2
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
4
4
5
5
val a :: as = List (1 , 2 , 3 ): @ unchecked
6
6
val lst @ b :: bs = List (1 , 2 , 3 ): @ unchecked
You can’t perform that action at this time.
0 commit comments