This is the mail archive of the gcc-prs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

java/1391: gcj accepts bogus this.OuterClass.method() construct



>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:


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]