Bug 2499 - Class members should be inherited from implemented interfaces
Summary: Class members should be inherited from implemented interfaces
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: java (show other bugs)
Version: 2.95.3
: P3 normal
Target Milestone: 4.3.0
Assignee: Not yet assigned to anyone
URL:
Keywords: rejects-valid
: 9869 13513 23596 (view as bug list)
Depends on: 28067
Blocks: 18131
  Show dependency treegraph
 
Reported: 2001-04-05 16:16 UTC by Mark Wielaard
Modified: 2007-01-09 20:43 UTC (History)
6 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Wielaard 2001-04-05 16:16:00 UTC
The following legal code is not accepted:

::::::::::::::
I.java
::::::::::::::
interface I {
        class Inner {}
}

::::::::::::::
Test.java
::::::::::::::
class Test implements I {
        void test(Inner i) { }
}


Test.java:2: Type `Inner' not found in the declaration of the argument `i' of method `test'.
   	void test(Inner i) { }
                     ^
1 error

Inner should be visible in Test since it is a class member of the interface I that Test implements.

Release:
gcc version 2.95.3 20010219 (prerelease)
Comment 1 Dara Hazeghi 2003-05-12 13:34:38 UTC
From: Dara Hazeghi <dhazeghi@yahoo.com>
To: gcc-gnats@gcc.gnu.org
Cc:  
Subject: Re: java/2499: Class members should be inherited from implemented interfaces
Date: Mon, 12 May 2003 13:34:38 -0700

 http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit- 
 trail&database=gcc&pr=2499
 
 Hello,
 
 I can confirm that this behavior still occurs on gcc 3.2, 3.3 branch  
 and mainline (20030511) on i686-linux.
 
 Dara
Comment 2 Andrew Pinski 2003-05-24 00:57:29 UTC
confirmed on mainline (20030523).
Comment 3 Andrew Pinski 2003-12-30 17:21:31 UTC
*** Bug 13513 has been marked as a duplicate of this bug. ***
Comment 4 Andrew Pinski 2004-01-01 08:14:51 UTC
Very related to bug 9869.
Comment 5 Andrew Pinski 2004-05-20 23:44:45 UTC
*** Bug 9869 has been marked as a duplicate of this bug. ***
Comment 6 Andrew Pinski 2004-08-20 16:05:05 UTC
I should note that it now ICE on the mainline.
Comment 7 Andrew Pinski 2005-08-10 23:55:35 UTC
And now it just rejects it.
Comment 8 Andrew Pinski 2005-08-27 20:45:38 UTC
*** Bug 23596 has been marked as a duplicate of this bug. ***
Comment 9 Andrew Pinski 2005-08-27 20:46:57 UTC
Another testcase for the same issue:
interface I {
        interface Inner {}
}
class Test implements I {
        void test(Inner i) { }
}

Which comes from PR 23596.
Comment 10 Tom Tromey 2007-01-09 20:43:25 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.