-
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_B[B]
case class CC_A()
case class CC_C[B]() extends T_B[B]
case class CC_D[B](b: T_B[B]) extends T_B[CC_A]
val v_a: T_B[CC_A] = CC_D(CC_D(null))
val v_b: Int = v_a match {
case CC_C() => 0
case CC_D(CC_C()) => 1
}
Output
Crashes runtime error (MatchError
)
Expectation
Should give a warning at compile time that the pattern match is not exhaustive.
He-Pin and enif-lee
Metadata
Metadata
Assignees
Labels
area:pattern-matchingarea:reportingError reporting including formatting, implicit suggestions, etcError reporting including formatting, implicit suggestions, etcitype:bug