Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add a test case, proving i15661 is fixed #19432

Merged
merged 1 commit into from
Jan 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions tests/warn/i15661.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
case class Composite[T](l: List[T], v: T)

def m(composite: Composite[?]): Unit =
composite match {
case Composite(l: List[Int], v: Int) => println(v) // warn: type test for List[Int] cannot be checked at runtime
case _ => println("This is not Int") // was: warn: Unreachable case except for null
}
Loading