Community
Participate
Working Groups
20050105 The compiler allows this. I guess only enum contants should be allowed. Note that X should probably also not be visible without qualification in the switch statement. public enum E { A, B, C; public static final E X= null; } class A { private void foo(E e) { switch (e) { case X: } } }
Wasn't checking the field was a proper enum constant; added check and new problem for this. Added EnumTest#test061. Fixed in latest.
Verified in I20050214