[JS] Report K2 diagnostics before Fir2IR

^KT-60531 fixed
This commit is contained in:
Anton Bannykh
2023-08-31 12:03:00 +02:00
committed by Space Team
parent 3590f0aa03
commit 387898056a
3 changed files with 14 additions and 78 deletions
@@ -524,6 +524,10 @@ class K2JsIrCompiler : CLICompiler<K2JSCompilerArguments>() {
)
}
if (analyzedOutput.reportCompilationErrors(moduleStructure, diagnosticsReporter, messageCollector)) {
throw CompilationErrorException()
}
// FIR2IR
val fir2IrActualizedResult = transformFirToIr(moduleStructure, analyzedOutput.output, diagnosticsReporter)
@@ -539,10 +543,6 @@ class K2JsIrCompiler : CLICompiler<K2JSCompilerArguments>() {
}
}
if (analyzedOutput.reportCompilationErrors(moduleStructure, diagnosticsReporter, messageCollector)) {
throw CompilationErrorException()
}
// Serialize klib
if (arguments.irProduceKlibDir || arguments.irProduceKlibFile) {
serializeFirKlib(