This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
java/1932: Yet another problem resolving qualified method call with inner classes
- To: gcc-gnats at gcc dot gnu dot org
- Subject: java/1932: Yet another problem resolving qualified method call with inner classes
- From: bryce at albatross dot co dot nz
- Date: 11 Feb 2001 08:23:20 -0000
- Reply-To: bryce at albatross dot co dot nz
>Number: 1932
>Category: java
>Synopsis: Yet another problem resolving qualified method call with inner classes
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun Feb 11 00:26:01 PST 2001
>Closed-Date:
>Last-Modified:
>Originator: Bryce McKinlay
>Release: gcc version 2.97 20010207 (experimental)
>Organization:
>Environment:
>Description:
Compile the test case below. It reports:
$ gcj -c T.java
T.java: In class `T':
T.java: In method `T.c()':
T.java:17: Can't find method `toString()' in type `'. Candidates are:
`Base.toString()' in `Base'
`Cl.toString()' in `Cl'.
n.toString();
^
1 error
Note that the type is blank in the error message and the
"In method" signature. The same error occurs when "Cl" is
non-static, but in that case the type is correctly given
as `T$Node'
>How-To-Repeat:
class Base
{
public String toString() {return "btb";}
}
class Cl
{
public String toString() {return "geh";}
}
public class T extends Base
{
static class Node extends Cl {}
void c(Node n)
{
n.toString();
}
}
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: