Name: ngR10089 Date: 11/26/2003
The latest draft of "A Typesafe Enum Facility for the Javatm Programming
Language" reads:
"Constructors cannot chain to a superclass constructor--chaining is
handled automatically by the compiler."
However javac (jdk1.5.0-b29) compiles the test below without error.
--------------- test.java-------------
enum clss39101a {
a1, a2;
int value;
clss39101a () {
super();
value++;
}
}
---------------------------------------
New JCK test
lang/CLSS/clss391/clss39101/clss39101.html
fails due to this bug.
======================================================================
- duplicates
-
JDK-4946639 Manual chaining from enum constructors does not cause a compiler error
- Closed