-
Notifications
You must be signed in to change notification settings - Fork 125
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Switch expression + Sealed Types] Suspect diagnostic about switch expression being inexhaustive #2719
Comments
I've just ran into what seems to be the same problem: sealed interface I {
enum E implements I {
A, B, C;
}
}
class Test {
void d(I i) {
switch (i) { // error: An enhanced switch statement should be exhaustive; a default label expected
case I.E.A -> {}
case I.E.B -> {}
case I.E.C -> {}
}
}
} But there are no other valid cases ( Didn't test with javac. Version: 2024-06 (4.32) |
No, this is a different problem with the same symptom - I have raised #2720 with the test case. |
More useful test case with some twists that is faultily rejected by ECJ, but accepted by javac:
|
This program compiles with javac, but ECJ complains about
A switch expression should have a default case
ECJ behavior is suspect - this is a follow up from #2714
The text was updated successfully, but these errors were encountered: