mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-09 09:47:51 +07:00
Getter inlining functionality moved to MethodCallInstruction Also: get rid of MethodCallInstruction.myPrecalculatedReturnValue. In any case, we do a lot of ad-hoc computations inside MethodCallInstruction. So we can move two cases when myPrecalculatedReturnValue was used (getter processing and empty collection processing) into MethodCallInstruction as well. This unifies code a little, and provides more possibilities, as we know current abstract interpretation state and can use it (in particular, stability of qualifier) Also: a new kind of MutationSignature 'transparent', which doesn't flush even private fields. It's not exposed to public annotations yet (appears to the user in the same way as 'pure') GitOrigin-RevId: 548ab12afc0d0314829f47e0ef51caec59985698
38 lines
742 B
Java
38 lines
742 B
Java
import java.util.*;
|
|
import org.jetbrains.annotations.*;
|
|
|
|
class Test {
|
|
private int x, y;
|
|
|
|
int getX() {
|
|
return x;
|
|
}
|
|
|
|
int getY() {
|
|
return y;
|
|
}
|
|
|
|
static void test(Test t) {
|
|
if (t.getX() == t.getY()) {
|
|
if (t.x == t.y) { // Who knows, probably subclass
|
|
|
|
}
|
|
}
|
|
if (t.getClass() == Test.class) {
|
|
if (t.getX() == t.getY()) {
|
|
if (<warning descr="Condition 't.x == t.y' is always 'true'">t.x == t.y</warning>) { // Definitely not subclass
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
static void test2() {
|
|
Test t = new Test();
|
|
if (t.getX() == t.getY()) {
|
|
if (<warning descr="Condition 't.x == t.y' is always 'true'">t.x == t.y</warning>) { // Definitely not subclass
|
|
|
|
}
|
|
}
|
|
}
|
|
} |