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 (I must be an E, which must be A, B or C).
Reported here by @nlisker : https://github.com/eclipse-jdt/eclipse.jdt.core/issues/2719#issuecomment-2232303720
I've just ran into what seems to be the same problem:
But there are no other valid cases (I must be an E, which must be A, B or C).
Didn't test with javac.
Version: 2024-06 (4.32) Build id: I20240601-0610