langtools/src/share/classes/com/sun/tools/javac/comp/Attr.java
changeset 9303 eae35c201e19
parent 9300 c2de4dd9853b
child 9599 0996df19ea87
equal deleted inserted replaced
9302:13a19cf713fd 9303:eae35c201e19
  2630          * reference its static members unless they are constant.
  2630          * reference its static members unless they are constant.
  2631          *
  2631          *
  2632          * @param tree    The tree making up the variable reference.
  2632          * @param tree    The tree making up the variable reference.
  2633          * @param env     The current environment.
  2633          * @param env     The current environment.
  2634          * @param v       The variable's symbol.
  2634          * @param v       The variable's symbol.
  2635          * @see JLS 3rd Ed. (8.9 Enums)
  2635          * @jls  section 8.9 Enums
  2636          */
  2636          */
  2637         private void checkEnumInitializer(JCTree tree, Env<AttrContext> env, VarSymbol v) {
  2637         private void checkEnumInitializer(JCTree tree, Env<AttrContext> env, VarSymbol v) {
  2638             // JLS 3rd Ed.:
  2638             // JLS:
  2639             //
  2639             //
  2640             // "It is a compile-time error to reference a static field
  2640             // "It is a compile-time error to reference a static field
  2641             // of an enum type that is not a compile-time constant
  2641             // of an enum type that is not a compile-time constant
  2642             // (15.28) from constructors, instance initializer blocks,
  2642             // (15.28) from constructors, instance initializer blocks,
  2643             // or instance variable initializer expressions of that
  2643             // or instance variable initializer expressions of that