From mboxrd@z Thu Jan 1 00:00:00 1970 From: bryce@gcc.gnu.org To: gcc-gnats@gcc.gnu.org Subject: java/4695: Error calling method from enclosing context in constructor Date: Thu, 25 Oct 2001 20:16:00 -0000 Message-id: <20011026030823.1844.qmail@sourceware.cygnus.com> X-SW-Source: 2001-10/msg00529.html List-Id: >Number: 4695 >Category: java >Synopsis: Error calling method from enclosing context in constructor >Confidential: no >Severity: serious >Priority: medium >Responsible: unassigned >State: open >Class: sw-bug >Submitter-Id: net >Arrival-Date: Thu Oct 25 20:16:00 PDT 2001 >Closed-Date: >Last-Modified: >Originator: Bryce McKinlay >Release: trunk >Organization: >Environment: >Description: Another test case distilled from classpath's TreeMap. GCJ reports: EnclosingCall.java:12: Can't reference `this' before the superclass constructor has been called. ... but we don't need to access this to call foo() - only this$0. >How-To-Repeat: public class EnclosingCall { int foo() { return 5; } class Inner { Inner() { this(foo()); } Inner (int i) { } } } >Fix: >Release-Note: >Audit-Trail: >Unformatted: