langtools/src/share/classes/com/sun/tools/javac/comp/Attr.java
changeset 8046 376310825f60
parent 8045 df2ca0edfbaa
child 8225 e9e5670e6a71
equal deleted inserted replaced
8045:df2ca0edfbaa 8046:376310825f60
  3154                 Symbol sym = null;
  3154                 Symbol sym = null;
  3155                 if (l.head.getTag() == JCTree.VARDEF) sym = ((JCVariableDecl) l.head).sym;
  3155                 if (l.head.getTag() == JCTree.VARDEF) sym = ((JCVariableDecl) l.head).sym;
  3156                 if (sym == null ||
  3156                 if (sym == null ||
  3157                     sym.kind != VAR ||
  3157                     sym.kind != VAR ||
  3158                     ((VarSymbol) sym).getConstValue() == null)
  3158                     ((VarSymbol) sym).getConstValue() == null)
  3159                     log.error(l.head.pos(), "icls.cant.have.static.decl");
  3159                     log.error(l.head.pos(), "icls.cant.have.static.decl", sym.location());
  3160             }
  3160             }
  3161         }
  3161         }
  3162 
  3162 
  3163         // Check for cycles among non-initial constructors.
  3163         // Check for cycles among non-initial constructors.
  3164         chk.checkCyclicConstructors(tree);
  3164         chk.checkCyclicConstructors(tree);