mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-09 11:44:39 +07:00
Fixes IDEA-275334 Contract is not properly evaluated when it refers to non-variable value GitOrigin-RevId: 4f507cbf602b186eb896f50fb8007d8d8ad75f45
10 lines
331 B
Java
10 lines
331 B
Java
class X {
|
|
native int getValue(int x);
|
|
|
|
void test() {
|
|
int result = Math.max(1, getValue(0));
|
|
int result2 = Math.max(getValue(0), 1);
|
|
if (<warning descr="Condition 'result > 0' is always 'true'">result > 0</warning>) {}
|
|
if (<warning descr="Condition 'result2 > 0' is always 'true'">result2 > 0</warning>) {}
|
|
}
|
|
} |