diff options
Diffstat (limited to 'tests/untried/neg/unchecked-impossible.scala')
-rw-r--r-- | tests/untried/neg/unchecked-impossible.scala | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/untried/neg/unchecked-impossible.scala b/tests/untried/neg/unchecked-impossible.scala new file mode 100644 index 000000000..985a2d0b0 --- /dev/null +++ b/tests/untried/neg/unchecked-impossible.scala @@ -0,0 +1,16 @@ +final case class T2[+A, +B](a: A, b: B) + +class A { + def f1 = T2(1, 2) match { + case Seq(x) => + case _ => + } + def f2 = T2(1, 2) match { + case _: T2[Int, Int] => /* nowarn */ + case _ => + } + def f3 = T2(1, 2) match { + case _: T2[_, Int] => /* nowarn */ + case _ => + } +} |