This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
java/2358: Inner class extending another in package: Can't find method
- To: gcc-gnats at gcc dot gnu dot org
- Subject: java/2358: Inner class extending another in package: Can't find method
- From: vegardh at clustra dot com
- Date: 23 Mar 2001 14:28:26 -0000
- Reply-To: vegardh at clustra dot com
>Number: 2358
>Category: java
>Synopsis: Inner class extending another in package: Can't find method
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: rejects-legal
>Submitter-Id: net
>Arrival-Date: Fri Mar 23 06:36:00 PST 2001
>Closed-Date:
>Last-Modified:
>Originator: Vegard B. Havdal
>Release: prerelease 20010320
>Organization:
>Environment:
RH6.2
>Description:
The classes One, Another and Yetanother compile with SUN javac,
but gcj -C says:
tull/One.java: In class `tull.Another':
tull/One.java: In method `tull.Another.toString()':
tull/One.java:11: Can't find method `toString()' in type `'. Candidates are:
`tull.Another.toString()' in `tull.Another'
`tull.One.toString()' in `tull.One'.
return y.toString();
^
1 error
>How-To-Repeat:
package tull;
class One {
public String toString() {
return "foo";
}
}
class Another {
Another.Yetanother y;
public String toString() {
return y.toString();
}
public static class Yetanother extends One {
}
}
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: