Files
openide/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/deleteSwitchLabel/beforeUnwrapExhaustiveSwitch1.java
Mikhail Pyltsin 830275db3c [java-highlighting] IDEA-324652 Unreachable branch quickfix produces incorrect code
GitOrigin-RevId: 3c00dae40f890c0a5bfda425f9c30d479f4d40b3
2023-07-17 11:27:28 +00:00

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";
}
});
}
}
}