-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Labels
area:pattern-matchingarea:reportingError reporting including formatting, implicit suggestions, etcError reporting including formatting, implicit suggestions, etcitype:bug
Milestone
Description
Compiler version
3.4.1
Minimized code
sealed trait T_A[A]
case class CC_B[A](a: T_A[A]) extends T_A[Byte]
case class CC_E[A](b: T_A[A]) extends T_A[Byte]
val v_a: T_A[Byte] = CC_E(CC_B(null))
val v_b: Int = v_a match {
case CC_E(CC_E(_)) => 0
case CC_B(_) => 1
}
Output
Crashes
Expectation
Should give a warning at compile time that the pattern match is not exhaustive.
Metadata
Metadata
Assignees
Labels
area:pattern-matchingarea:reportingError reporting including formatting, implicit suggestions, etcError reporting including formatting, implicit suggestions, etcitype:bug