Files
openide/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/splitSwitchBranchWithSeveralCaseValues/afterPatternNullRule2.java
T
2021-07-21 15:58:43 +00:00

11 lines
294 B
Java

// "Split values of 'switch' branch" "true"
class C {
void foo(Object o) {
String s = "";
switch (o) {
case Number n -> s = "x";
case null -> s = "x";
default -> throw new IllegalStateException("Unexpected value: " + o);
}
}
}