Community
Participate
Working Groups
I20080311-0924 Given: package test; public class Other { private static class Inner1 { private int field; } private static class Inner2 extends Inner1 { private int field; public void bar() {System.out.println(field);} } } Is: Other.Inner2.field is hiding a field from type Other.Inner1 Should: No warning? Can a private field hide another private field? Both types are static. Extract Inner1 and the warning is gone...
Agreed, we should not complain in this case. A visibility check is missing in this one scenario.
Created attachment 93584 [details] Proposed patch
Added FieldAccessTest#test017-020
Released for 3.4M6. Fixed
verified for 3.4 M6 using build I20080326-1950