gcj/274: bogus error for inner class "Class.this.method"
osk@hem.passagen.se
osk@hem.passagen.se
Sat Jul 1 12:40:00 GMT 2000
>Number: 274
>Category: gcj
>Synopsis: bogus error for inner class "Class.this.method"
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: apbianco
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat Jul 01 12:40:02 PDT 2000
>Closed-Date:
>Last-Modified:
>Originator: Oskar Liljeblad
>Release: unknown-1.0
>Organization:
>Environment:
Debian GNU/Linux
GNU libc 2.1.3
gcc 2.96 snapshot 20000612
libgcj snapshot 2000-06-18
>Description:
Compiling the attached class with gcj gives:
$ gcj -c Test.java
Test.java: In class `Test$1':
Test.java: In method `paint()':
Test.java:14: No case for tree code `identifier_node' - java_complete_tree
$ javac Test.java
$
The error is also reported for line 15 (Component.this.getSize()) in
the source.
Oskar Liljeblad (osk@hem.passagen.se)
Test.java:
class Component {
public int getSize() { return 0; }
}
class Canvas extends Component {
public int getSize() { return 1; }
}
public class Test extends Component {
public Test() {
new Canvas() {
public void paint() {
int foo1 = getSize();
int foo2 = Canvas.this.getSize();
int foo3 = Component.this.getSize();
}
};
}
}
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the Java-prs
mailing list