mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-17 15:50:53 +07:00
13 lines
306 B
Java
13 lines
306 B
Java
// "Remove switch branch 'A'" "true-preview"
|
|
class X {
|
|
enum X {A,B,C}
|
|
|
|
void test(X x) {
|
|
if (x == X.A) return;
|
|
int res = switch(x) {
|
|
case B -> 2;
|
|
case C -> 3;
|
|
default -> throw new IllegalStateException("Unexpected value: " + x);
|
|
};
|
|
}
|
|
} |