R
Roedy Green
I was baffled why the compiler would not let enum constructors access
the enum's static variables.
I consider it a bug, but an understandable bug.
I think the reason is the enum invokes the constructors for the enum
constants in static init code. Somebody was worried that the static
initialisation would not be complete. Yet it is quite safe since the
enum constants are the last bit of static init.
the enum's static variables.
I consider it a bug, but an understandable bug.
I think the reason is the enum invokes the constructors for the enum
constants in static init code. Somebody was worried that the static
initialisation would not be complete. Yet it is quite safe since the
enum constants are the last bit of static init.