Files
openide/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/moveSwitchBranchUp/beforeLabeledRule.java
Andrey.Cherkasov c38121fc35 [java-highlighting] Provide fix "Move switch branch '...' before '...'" for "Label is dominated by a preceding case label" error
IDEA-272296

GitOrigin-RevId: 70c062f7d125c9b6116bd7e141da920f667f7c54
2021-10-05 22:24:08 +00:00

11 lines
241 B
Java

// "Move switch branch 'Integer i' before 'Number n'" "true"
class Main {
void test(Object o) {
int x = switch (o) {
case Number n -> 2;
case String s -> 3;
case Integer i<caret> -> 1;
default -> 4;
};
}
}