// this should not compile package samename; public class WrongScope { public int v1 () { class SingleName { int v1 = 1; } // Should not compile. return new SingleName ().v2; } public int v2 () { class SingleName { int v2 = 2; } return new SingleName ().v2; } }
-- Summary: variable access directed to class of different scope Product: gcc Version: 4.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: java AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: cagney at redhat dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26095