Files
openide/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/deleteSwitchLabel/beforeUnwrapExpression.java
Anna Kozlova bd1a21a02a bump highest language level to 14, prepare to remove 13_preview
GitOrigin-RevId: ec42a9047ba63b0cbaddd8357d11ae2ed56ed6b6
2020-04-01 12:31:42 +00:00

25 lines
686 B
Java

// "Remove unreachable branches" "true"
class Main {
static void fff(int x) {
if (x == 5) {
System.out.println(switch (x) {
case 1 -> "one"; //1
case 2 -> "two"; //2
case 3 -> "three"; //3
case 4 -> "four"; //4
case 0, <caret>5, 10 -> {
System.out.println("something");
break "five-ten-fifteen"; //5
}
case 6 -> "six"; //6
case 7 -> "seven"; //7
default -> "and more"; //other
});
}
}
public static void main(String[] args) {
fff();
}
}