This is the mail archive of the
gcc-prs@gcc.gnu.org
mailing list for the GCC project.
java/1391: gcj accepts bogus this.OuterClass.method() construct
- To: java-gnats at sourceware dot cygnus dot com
- Subject: java/1391: gcj accepts bogus this.OuterClass.method() construct
- From: mark at klomp dot org
- Date: 24 Oct 2000 22:12:41 -0000
- Reply-To: mark at klomp dot org
>Number: 1391
>Category: java
>Synopsis: gcj accepts bogus this.OuterClass.method() construct
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: apbianco
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Dec 20 12:19:32 PST 2000
>Closed-Date:
>Last-Modified:
>Originator: Mark Wielaard
>Release: unknown-1.0
>Organization:
>Environment:
gcc version 2.97 20001024 (experimental) + patch from gcj/283
>Description:
The following is accepted by gcj but is bogus
line 13 should have read:
System.out.println(Test.this.toString());
public class Test {
public static void main(String[] args) {
new Test().getInner().m();
}
public Inner getInner() {
return new Inner();
}
public class Inner {
public void m() {
System.out.println(this.Test.toString());
}
}
}
Removing the toString() from line 13:
System.out.println(this.Test);
gives
$ gcj --main=Test Test.java
Test.java: In class `Test$Inner':
Test.java: In method `m()':
Test.java:13: internal error in check-init: tree code not implemented: type_decl
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
Formerly PR gcj/362
>Unformatted: