properly report error in initialization loop
This commit is contained in:
@@ -60,13 +60,13 @@ public class JetStandardLibrary {
|
||||
// before any type checking is run
|
||||
public static synchronized void initialize(@NotNull Project project) {
|
||||
if (instance == null) {
|
||||
if (initializing) {
|
||||
throw new IllegalStateException("builtin library initialization loop");
|
||||
}
|
||||
if (initializationFailed != null) {
|
||||
throw new RuntimeException(
|
||||
"builtin library initialization failed previously: " + initializationFailed, initializationFailed);
|
||||
}
|
||||
if (initializing) {
|
||||
throw new IllegalStateException("builtin library initialization loop");
|
||||
}
|
||||
initializing = true;
|
||||
try {
|
||||
instance = new JetStandardLibrary(project);
|
||||
|
||||
Reference in New Issue
Block a user