src/share/classes/com/sun/tools/javac/comp/Attr.java

changeset 830
02e6e7dd1a64
parent 829
ce6175cfe11e
child 841
df371fd16386
equal deleted inserted replaced
829:ce6175cfe11e 830:02e6e7dd1a64
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);

mercurial