mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-17 15:50:53 +07:00
19 lines
378 B
Java
19 lines
378 B
Java
// "Remove unreachable branches" "false"
|
|
|
|
public class Switches {
|
|
sealed interface I2{}
|
|
enum En implements I2{A, B,}
|
|
void foo(I2 x) {
|
|
if (x == En.A) {
|
|
System.out.println(switch (x) {
|
|
case En.A<caret> -> {
|
|
System.out.println("something");
|
|
yield "1";
|
|
}
|
|
case En.B ->{
|
|
yield "2";
|
|
}
|
|
});
|
|
}
|
|
}
|
|
} |