From mboxrd@z Thu Jan 1 00:00:00 1970 From: bryce@albatross.co.nz To: gcc-gnats@gcc.gnu.org Subject: java/1932: Yet another problem resolving qualified method call with inner classes Date: Sun, 01 Apr 2001 00:00:00 -0000 Message-id: <20010211082320.10857.qmail@sourceware.cygnus.com> X-SW-Source: 2001-q1/msg01124.html List-Id: >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: