Community
Participate
Working Groups
The JLS 3 (chapter 8 p257) specifies that "It is a compile-time error to reference a non-constant (§15.28) static field of an enum type from its constructors, instance initializer blocks, or instance variable initializer expressions." but the following code does compile with eclipse : enum Foo { A(0); Foo(int x) { t[0]=x; } private static final int[] t = new int[12]; } Rémi Forax
Closing as dup of bug 101713. This is fixed in 3.2M1 and in the 3.1 maintenance stream. *** This bug has been marked as a duplicate of 101713 ***
Added regression test in org.eclipse.jdt.core.tests.compiler.regression.EnumTest.test123.