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

changeset 855
afe226180744
parent 853
875262e89b52
child 858
96d4226bdd60
equal deleted inserted replaced
854:03cf47d4de15 855:afe226180744
2372 Env<AttrContext> env, 2372 Env<AttrContext> env,
2373 Type pt, 2373 Type pt,
2374 int pkind) { 2374 int pkind) {
2375 DiagnosticPosition pos = tree.pos(); 2375 DiagnosticPosition pos = tree.pos();
2376 Name name = tree.name; 2376 Name name = tree.name;
2377
2378 switch (site.tag) { 2377 switch (site.tag) {
2379 case PACKAGE: 2378 case PACKAGE:
2380 return rs.access( 2379 return rs.access(
2381 rs.findIdentInPackage(env, site.tsym, name, pkind), 2380 rs.findIdentInPackage(env, site.tsym, name, pkind),
2382 pos, location, site, name, true); 2381 pos, location, site, name, true);
3184 Symbol sym = null; 3183 Symbol sym = null;
3185 if (l.head.getTag() == JCTree.VARDEF) sym = ((JCVariableDecl) l.head).sym; 3184 if (l.head.getTag() == JCTree.VARDEF) sym = ((JCVariableDecl) l.head).sym;
3186 if (sym == null || 3185 if (sym == null ||
3187 sym.kind != VAR || 3186 sym.kind != VAR ||
3188 ((VarSymbol) sym).getConstValue() == null) 3187 ((VarSymbol) sym).getConstValue() == null)
3189 log.error(l.head.pos(), "icls.cant.have.static.decl", sym.location()); 3188 log.error(l.head.pos(), "icls.cant.have.static.decl", c);
3190 } 3189 }
3191 } 3190 }
3192 3191
3193 // Check for cycles among non-initial constructors. 3192 // Check for cycles among non-initial constructors.
3194 chk.checkCyclicConstructors(tree); 3193 chk.checkCyclicConstructors(tree);

mercurial