Bug 19841 - Inner classes problem
Summary: Inner classes problem
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: 18131
  Show dependency treegraph
 
Reported: 2005-02-09 09:34 UTC by Norman Hendrich
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-08-10 23:58:32


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Norman Hendrich 2005-02-09 09:34:18 UTC
gcj fails to compile the following testcases, while jikes, javac, and Eclipse
allow the code. (Might be a duplicate of existing inner classes problem 
reports.)


/* GCJ inner class problem */

import java.awt.*;

public class SSS extends Canvas {
  int state = 0;

  public class Selector extends Dialog {
    public Selector( Frame parent ) {
      super( parent );
    }

    public void foo() {
      state = 42;
    }
  }

}
Comment 1 Andrew Pinski 2005-02-09 13:52:04 UTC
Confirmed, here is a self contained example (which shows easier where the problem is):
class T
{
 private int state;
}
public class SSS {
  int state = 0;
  public class Selector extends T {
    public void foo() {
      state = 42;
    }
  }
}
Comment 2 Andrew Pinski 2005-02-09 13:58:01 UTC
I looked and I don't see this as being a duplicate of the existing inner class bug reports.
Comment 3 Tom Tromey 2007-01-09 20:47:07 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.