diff -r 06ac98da3f82 -r 61082a97bbf0 langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/api/JavacTrees.java --- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/api/JavacTrees.java Thu Sep 22 18:31:35 2016 +0000 +++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/api/JavacTrees.java Fri Sep 23 15:35:32 2016 +0200 @@ -383,18 +383,16 @@ JCTree tree = (JCTree) path.getLeaf(); Symbol sym = TreeInfo.symbolFor(tree); if (sym == null) { - if (TreeInfo.isDeclaration(tree)) { - for (TreePath p = path; p != null; p = p.getParentPath()) { - JCTree t = (JCTree) p.getLeaf(); - if (t.hasTag(JCTree.Tag.CLASSDEF)) { - JCClassDecl ct = (JCClassDecl) t; - if (ct.sym != null) { - if ((ct.sym.flags_field & Flags.UNATTRIBUTED) != 0) { - attr.attribClass(ct.pos(), ct.sym); - sym = TreeInfo.symbolFor(tree); - } - break; + for (TreePath p = path; p != null; p = p.getParentPath()) { + JCTree t = (JCTree) p.getLeaf(); + if (t.hasTag(JCTree.Tag.CLASSDEF)) { + JCClassDecl ct = (JCClassDecl) t; + if (ct.sym != null) { + if ((ct.sym.flags_field & Flags.UNATTRIBUTED) != 0) { + attr.attribClass(ct.pos(), ct.sym); + sym = TreeInfo.symbolFor(tree); } + break; } } }