Files
Mikhail Pyltsin 830275db3c [java-highlighting] IDEA-324652 Unreachable branch quickfix produces incorrect code
GitOrigin-RevId: 3c00dae40f890c0a5bfda425f9c30d479f4d40b3
2023-07-17 11:27:28 +00:00

26 lines
477 B
Java

// "Remove unreachable branches" "true-preview"
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 -> {
System.out.println("something");
yield "many";
}
});
}
}
}