-
Bug
-
Resolution: Fixed
-
P3
-
1.1.3
-
1.2beta
-
x86, sparc
-
solaris_2.5.1, windows_95
-
Verified
Name: laC46010 Date: 07/09/97
Java compiler fails to compile a code, where an inner class is
declared within an anonymous inner class. In example "Test.java"
below, all JDK compilers from 1.1 thru 1.1.3 report the following
compile-time error:
Test.java:2: Superclass of local class Test. 1 not found.
Object o = new Object() {
^
1 error
Note, that it is essential for this error that inner class
(or interface) 'A' is declared withing anonymous class extending
class 'Object'.
--------------------Test.java----------------------
class Test {
Object o = new Object() {
class A {}
};
}
--------------------------------------------------------------------------------
======================================================================