User account creation filtered due to spam.

Bug 9547 - member type access not respected
Summary: member type access not respected
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: java (show other bugs)
Version: 3.4.0
: P3 normal
Target Milestone: 4.3.0
Assignee: Not yet assigned to anyone
URL:
Keywords: accepts-invalid
Depends on: 28067
Blocks: 13607
  Show dependency treegraph
 
Reported: 2003-02-03 18:06 UTC by Tom Tromey
Modified: 2007-01-09 20:44 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2005-07-23 05:27:22


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tom Tromey 2003-02-03 18:06:00 UTC
Right now gcj will let a subclass see member type defined
in a superclass, even if that member type has default
access protection and the two classes are in different
packages.

For instance, this code compiles but should not.

package one;

import two.*;

public class o extends t
{
  boolean doit(Object x)
  {
    return x instanceof Res;
  }
}
package two;

public class t
{
  class Res
  {
  }
}

Release:
unknown
Comment 1 Andrew Pinski 2003-05-26 00:13:21 UTC
Still exits on the mainline (20030525).
Comment 2 Andrew Pinski 2003-12-03 05:50:04 UTC
There are couple of bugs like this one, I wondering if they will ever get fixed? 
Comment 3 Tom Tromey 2003-12-03 16:40:45 UTC
Nobody knows... I suppose someone will fix these bugs
when they become important for some reason.
I know the package-private bug is in process at least.
Comment 4 Tom Tromey 2007-01-09 20:44:56 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.