Skip to content

Commit 81e02c6

Browse files
dwijnandWojciechMazur
authored andcommitted
Add a test case, proving i15661 is fixed
[Cherry-picked afb4825]
1 parent 186fb72 commit 81e02c6

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tests/warn/i15661.scala

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
case class Composite[T](l: List[T], v: T)
2+
3+
def m(composite: Composite[?]): Unit =
4+
composite match {
5+
case Composite(l: List[Int], v: Int) => println(v) // warn: type test for List[Int] cannot be checked at runtime
6+
case _ => println("This is not Int") // was: warn: Unreachable case except for null
7+
}

0 commit comments

Comments
 (0)