IR: move CompilationErrorException to frontend.common

This commit is contained in:
Alexander Udalov
2021-02-21 13:33:13 +01:00
parent 1ae46b529f
commit 837eb739ea
5 changed files with 14 additions and 8 deletions
@@ -16,7 +16,7 @@
package org.jetbrains.kotlin.ir.util
import org.jetbrains.kotlin.analyzer.AnalysisResult
import org.jetbrains.kotlin.analyzer.CompilationErrorException
import org.jetbrains.kotlin.descriptors.ModuleDescriptor
import org.jetbrains.kotlin.ir.declarations.IrDeclaration
import org.jetbrains.kotlin.ir.descriptors.IrBuiltIns
@@ -54,7 +54,7 @@ class ExternalDependenciesGenerator(
// We wait for the unbound to stabilize on fake overrides.
} while (unbound != prevUnbound)
} catch (ex: KotlinIrLinkerInternalException) {
throw AnalysisResult.CompilationErrorException()
throw CompilationErrorException()
}
}
}
@@ -10,6 +10,7 @@ import com.intellij.openapi.vfs.VfsUtilCore
import com.intellij.psi.PsiElement
import org.jetbrains.kotlin.analyzer.AbstractAnalyzerWithCompilerReport
import org.jetbrains.kotlin.analyzer.AnalysisResult
import org.jetbrains.kotlin.analyzer.CompilationErrorException
import org.jetbrains.kotlin.backend.common.extensions.IrGenerationExtension
import org.jetbrains.kotlin.backend.common.extensions.IrPluginContextImpl
import org.jetbrains.kotlin.backend.common.lower.ExpectDeclarationRemover
@@ -414,7 +415,7 @@ private class ModulesStructure(
var hasErrors = false
if (analyzer.hasErrors() || analysisResult !is JsAnalysisResult) {
if (!errorPolicy.allowErrors)
throw AnalysisResult.CompilationErrorException()
throw CompilationErrorException()
else hasErrors = true
}