Skip to content

Commit 0e00e69

Browse files
committed
Error on narrowing pattern definitions
1 parent 6a96b8e commit 0e00e69

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tests/neg/unchecked-patterns.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
object Test {
22
val (y1: Some[Int] @unchecked) = Some(1): Option[Int] // OK
33
val y2: Some[Int] @unchecked = Some(1): Option[Int] // error
4+
5+
val x :: xs = List(1, 2, 3) // error
46
}

0 commit comments

Comments
 (0)