equal
deleted
inserted
replaced
1808 sym.owner.kind == TYP && |
1808 sym.owner.kind == TYP && |
1809 (sym.flags() & STATIC) == 0) { |
1809 (sym.flags() & STATIC) == 0) { |
1810 chk.earlyRefError(tree.pos(), sym.kind == VAR ? sym : thisSym(tree.pos(), env)); |
1810 chk.earlyRefError(tree.pos(), sym.kind == VAR ? sym : thisSym(tree.pos(), env)); |
1811 } |
1811 } |
1812 Env<AttrContext> env1 = env; |
1812 Env<AttrContext> env1 = env; |
1813 if (sym.kind != ERR && sym.owner != null && sym.owner != env1.enclClass.sym) { |
1813 if (sym.kind != ERR && sym.kind != TYP && sym.owner != null && sym.owner != env1.enclClass.sym) { |
1814 // If the found symbol is inaccessible, then it is |
1814 // If the found symbol is inaccessible, then it is |
1815 // accessed through an enclosing instance. Locate this |
1815 // accessed through an enclosing instance. Locate this |
1816 // enclosing instance: |
1816 // enclosing instance: |
1817 while (env1.outer != null && !rs.isAccessible(env, env1.enclClass.sym.type, sym)) |
1817 while (env1.outer != null && !rs.isAccessible(env, env1.enclClass.sym.type, sym)) |
1818 env1 = env1.outer; |
1818 env1 = env1.outer; |