mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-16 14:23:28 +07:00
14 lines
324 B
Java
14 lines
324 B
Java
// "Surround with 'if ((b ? foo(1) : foo(2)) != null)'" "true-preview"
|
|
class A {
|
|
void bar(String s) {}
|
|
|
|
void foo(boolean b){
|
|
if ((b ? foo(1) : foo(2)) != null) {
|
|
bar(b ? foo(1) : foo(2));
|
|
}
|
|
}
|
|
|
|
static String foo(int x) {
|
|
return x > 0 ? "pos" : x < 0 ? "neg" : null;
|
|
}
|
|
} |