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