dataflow: do not treat fields with qualified this as effectively unqualified (IDEA-99722)

This commit is contained in:
Anna Kozlova
2013-01-25 16:11:35 +04:00
parent 6691f6e7f9
commit 76fd58b48c
3 changed files with 27 additions and 1 deletions
@@ -0,0 +1,12 @@
abstract class Foo {
protected String bar;
}
class FF extends Foo {
class FFI extends Foo {
void f() {
if (this.bar == FF.this.bar);
if (<warning descr="Condition 'this.bar == FFI.this.bar' is always 'true'">this.bar == FFI.this.bar</warning>);
}
}
}
@@ -100,6 +100,7 @@ public class DataFlowInspectionTest extends LightCodeInsightFixtureTestCase {
public void testPassingNullableIntoVararg() throws Throwable { doTest(); }
public void testEqualsImpliesNotNull() throws Throwable { doTest(); }
public void testEffectivelyUnqualified() throws Throwable { doTest(); }
public void testAnnotatedTypeParameters() throws Throwable {
setupCustomAnnotations();