42 import static com.sun.tools.javac.code.Flags.*; |
42 import static com.sun.tools.javac.code.Flags.*; |
43 import static com.sun.tools.javac.code.Flags.ANNOTATION; |
43 import static com.sun.tools.javac.code.Flags.ANNOTATION; |
44 import static com.sun.tools.javac.code.Kinds.*; |
44 import static com.sun.tools.javac.code.Kinds.*; |
45 import static com.sun.tools.javac.code.TypeTags.*; |
45 import static com.sun.tools.javac.code.TypeTags.*; |
46 import static com.sun.tools.javac.tree.JCTree.Tag.*; |
46 import static com.sun.tools.javac.tree.JCTree.Tag.*; |
|
47 import com.sun.tools.javac.util.JCDiagnostic.DiagnosticFlag; |
47 import com.sun.tools.javac.util.JCDiagnostic.DiagnosticPosition; |
48 import com.sun.tools.javac.util.JCDiagnostic.DiagnosticPosition; |
48 |
49 |
49 /** This is the second phase of Enter, in which classes are completed |
50 /** This is the second phase of Enter, in which classes are completed |
50 * by entering their members into the class scope using |
51 * by entering their members into the class scope using |
51 * MemberEnter.complete(). See Enter for an overview. |
52 * MemberEnter.complete(). See Enter for an overview. |
140 // If we can't find java.lang, exit immediately. |
141 // If we can't find java.lang, exit immediately. |
141 if (((PackageSymbol)tsym).fullname.equals(names.java_lang)) { |
142 if (((PackageSymbol)tsym).fullname.equals(names.java_lang)) { |
142 JCDiagnostic msg = diags.fragment("fatal.err.no.java.lang"); |
143 JCDiagnostic msg = diags.fragment("fatal.err.no.java.lang"); |
143 throw new FatalError(msg); |
144 throw new FatalError(msg); |
144 } else { |
145 } else { |
145 log.error(pos, "doesnt.exist", tsym); |
146 log.error(DiagnosticFlag.RESOLVE_ERROR, pos, "doesnt.exist", tsym); |
146 } |
147 } |
147 } |
148 } |
148 env.toplevel.starImportScope.importAll(tsym.members()); |
149 env.toplevel.starImportScope.importAll(tsym.members()); |
149 } |
150 } |
150 |
151 |