Files
openide/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/emptyStatement/beforeIfSwitchCondition.java
Anna Kozlova bd1a21a02a bump highest language level to 14, prepare to remove 13_preview
GitOrigin-RevId: ec42a9047ba63b0cbaddd8357d11ae2ed56ed6b6
2020-04-01 12:31:42 +00:00

27 lines
580 B
Java

// "Extract side effect" "true"
class Z {
void z() {
i<caret>f (switch(0) {
case 0 -> false;
case 1 -> {
System.out.println("oops");
yield true;
}
case 2 -> {
System.out.println("bar");
yield Math.random() > 0.5 && new Foo().getBar();
}
case 3 -> {
if(Math.random() > 0.5) yield true;
else yield false;
}
case 4 -> {
if(Math.random() > 0.5) yield true;
System.out.println("four");
yield false;
}
default -> "foo"+(new Foo());
}) {}
}
}