Files
openide/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/surroundWithIf/beforeTernary.java
2018-11-27 16:57:29 +07:00

12 lines
264 B
Java

// "Surround with 'if ((b ? foo(1) : foo(2)) != null)'" "true"
class A {
void bar(String s) {}
void foo(boolean b){
bar(b ? foo(1)<caret> : foo(2));
}
static String foo(int x) {
return x > 0 ? "pos" : x < 0 ? "neg" : null;
}
}