java/1932: Yet another problem resolving qualified method call with inner classes
bryce@albatross.co.nz
bryce@albatross.co.nz
Sun Feb 11 00:26:00 GMT 2001
>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:
More information about the Gcc-bugs
mailing list