Closed
Description
minimized code
Behold my beautiful enum.
sealed trait Pretty { self: Color => }
sealed trait Dull { self: Color => }
enum Color {
case Pink extends Color with Pretty
case Red extends Color with Dull
}
def describe(c: Color) = c match {
case Color.Pink => "Amazing!"
case Color.Red => "Yawn..."
}
Compilation output
8 |def describe(c: Color) = c match {
| ^
| match may not be exhaustive.
|
| It would fail on pattern case: _: Color
expectation
No warning.