Name: dkC59003 Date: 12/17/97
Compiler along with correct error outputs incorrect error message while compiling
the following source file.
The case of astract method within non abstract class certainly should be reported
whereas astract inner class within non abstract class is not an error.
Beside the message is incorrect it occurs first which can confuse a user.
Note that if the method m definition is removed compilation correctly ends without
any messages.
-----------------------------------------
class C {
abstract class a {} // no error
abstract void m(); // compile-time error
}
-----------------------------------------
JDK 1.2Z compiler outputs:
t1.java:2: class C must be declared abstract. It does not define inner class C. a from class C.
class C {
^
t1.java:2: class C must be declared abstract. It does not define void m() from class C.
class C {
^
2 errors
-----------------------------------------
======================================================================