gcj/373: interface inner classes are implicitly static
osk@hem.passagen.se
osk@hem.passagen.se
Thu Nov 23 12:40:00 GMT 2000
>Number: 373
>Category: gcj
>Synopsis: interface inner classes are implicitly static
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: apbianco
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Nov 23 12:40:00 PST 2000
>Closed-Date:
>Last-Modified:
>Originator: Oskar Liljeblad
>Release: unknown-1.0
>Organization:
>Environment:
gcj 2.97 20001106
>Description:
I think gcj should not require the static keyword for
inner classes in interfaces.
$ cat demo.java
interface Interface {
public class Inner {}
}
class Main {
public static void main(String[] args) {
new Interface.Inner();
}
}
$ gcj -C demo.java
demo.java: In class `Main':
demo.java: In method `main(java.lang.String[])':
demo.java:7: No enclosing instance for inner class `Interface$Inner' is in scope.
new Interface.Inner();
^
1 error
$
Oskar Liljeblad (osk@hem.passagen.se)
>How-To-Repeat:
>Fix:
Should be simple (but I haven't studied compiler technologies
yet)...
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the Java-prs
mailing list