mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-17 07:20:53 +07:00
22 lines
418 B
Java
22 lines
418 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 -> "and more"; // other
|
|
});
|
|
}
|
|
}
|
|
}
|