Closed
Description
port fixes from scala 2 that closed scala/scala#9211
Compiler version
3.1.1
Minimized code
trait A {
sealed abstract class X
private class X1 extends X with X2 { }
private trait X2 extends X
sealed trait X3 extends X
def f(x: X) = x match {
case _: X1 => 0
}
}
Output
-- [E029] Pattern Match Exhaustivity Warning: ----------------------------------
7 | def f(x: X) = x match {
| ^
| match may not be exhaustive.
|
| It would fail on pattern case: _: X2, _: X3
Expectation
No warning, like scala 2