Community
Participate
Working Groups
Using latest, the compiler doesn't complain when super(); is used in an enum constructor. Test case: public enum X { ; X() { super(); } } javac reports: X.java:4: call to super not allowed in enum constructor super(); ^ 1 error
I think I know how to fix this one. I'll provide a patch.
Created attachment 16214 [details] Apply on HEAD
Philippe, could you please verify it?
Created attachment 16215 [details] Apply on HEAD Modify the error message to: Explicit constructor call is not allowed in an enum constructor instead of: Explicit constructor call is not allowed in enum constructor
Created attachment 16222 [details] Apply on HEAD I forgot to test if the explicit constructor call was an implicit super. It is ok, if this is an implicit super.
All ASTConverter15Test passed with this last patch.
Created attachment 16223 [details] Test case Apply on org.eclipse.jdt.core.tests.compiler
Integrated proposed patch (and renamed a few things). Added extra regression test: EnumTest#test051. Fixed
Verified in 200412140800