Files
openide/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/convertSwitchToIf/beforePrecedence.java
Tagir Valeev 338f8674e2 [java-intentions] ConvertSwitchToIfIntention: properly add parentheses when equals() is used
GitOrigin-RevId: cf05261337ac10785b23338860ab039fca271373
2023-03-20 17:26:19 +00:00

9 lines
208 B
Java

// "Replace 'switch' with 'if'" "true-preview"
class X {
void test(int i) {
switch<caret> ("1" + (--i)) {
case "2" -> System.out.println("2");
default -> System.out.println("1");
}
}
}