Files
openide/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/deleteSwitchLabel/afterUnwrapExpression5.java
Andrey.Cherkasov 96cd89dd5d [java-inspections] False negative "Constant conditions & exceptions"
IDEA-296900

GitOrigin-RevId: 58bd64b886d5d2c5c359f34d1df2fdb639495114
2022-06-28 03:52:03 +00:00

22 lines
410 B
Java

// "Remove unreachable branches" "true"
class Main {
void foo(int x) {
if (x == 42) {
System.out.println(switch (x) {
// 1
// 2
// 3
// 4
// 5
// 6
// 7
case 42 -> {
System.out.println("something");
yield "Six by nine"; // 42
}
default -> "and more"; // other
});
}
}
}