User account creation filtered due to spam.

Bug 20193 - Variable names incorrectly resolved in inner classes.
Summary: Variable names incorrectly resolved in inner classes.
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: java (show other bugs)
Version: 4.0.0
: P2 normal
Target Milestone: 4.3.0
Assignee: Not yet assigned to anyone
URL:
Keywords: rejects-valid
Depends on: 28067
Blocks:
  Show dependency treegraph
 
Reported: 2005-02-24 15:14 UTC by Thomas Hallgren
Modified: 2007-01-09 20:47 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2005-06-30 05:11:44


Attachments
Java class that illustrates the problem. (198 bytes, text/plain)
2005-02-24 15:16 UTC, Thomas Hallgren
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Hallgren 2005-02-24 15:14:37 UTC
An inner class that references a static variable in an outer class will fail if
the super class of that outer class defines the same variable with a visibility
that makes it inaccessible to the inner class.
Comment 1 Thomas Hallgren 2005-02-24 15:16:19 UTC
Created attachment 8271 [details]
Java class that illustrates the problem.

Try gcj -c ScopeProblem.java. It fails with:
ScopeProblem.java:12: error: Can't access package-private field ...
Comment 2 Tom Tromey 2007-01-09 20:47:22 UTC
All gcj front end bugs have been fixed by the gcj-eclipse branch merge.
I'm mass-closing the affected PRs.
If you believe one of these was closed in error, please reopen it
with a note explaining why.
Thanks.