Community
Participate
Working Groups
20050127 The compiler allows this but probably shouldn't (javac rejects it). public enum E { A; private void foo() { E e= new E() { }; } }
Created attachment 17521 [details] Apply on QualifiedAllocationExpression
We should complain. Enums cannot be subclassed by user code (only enum constant bodies can do so). Thanks for finding it
The patch doesn't work. The test needs to be: receiverType.isEnum() && type != null
Created attachment 17522 [details] Apply on QualifiedAllocationExpression
I had figured this too.
Added EnumTest#test065. Fixed
Verified in I20050214