Community
Participate
Working Groups
I200411111200 + jdt.ui, jdt.core (v522), etc. from HEAD : The the inner 'field' hides the outer one, but IBinding#isEqualTo(..) returns true when comparing the two: public class TestThisExpressionInner { int field; class Inner { int field; public void foo() { field= 10; TestThisExpressionInner.this.field= 11; } } public void foo() { field= 10; } }
A simpler example: Bindings for A.field and I.field are considered isEqualTo(..) each other: class A implements I { public static final int field= 1; } interface I { int field= 1000; } Also doesn't work when comparing methods m(){} instead of fields.
Fixed and released in HEAD. Regression tests added. ASTConverterTestAST3_2.test0574 and test0575.
Verified (in I200412140010) that the first test ensures that the 2 fields are not equal, and that the second test ensures that the 2 methods are not equal.