IDEA-175296 Uncaught 'condition is always false' with interface constant

This commit is contained in:
peter
2017-07-13 17:58:13 +02:00
parent 9e79d40766
commit dae7dcdcd5
3 changed files with 23 additions and 1 deletions
@@ -0,0 +1,10 @@
interface I {
Object CONST = new Object();
}
class C {
void foo(Object o) {
if (o == I.CONST) return;
if (<warning descr="Condition 'o != I.CONST' is always 'true'">o != I.CONST</warning>) return;
}
}