diff --git a/compiler/cli/src/org/jetbrains/kotlin/cli/common/messages/AnalyzerWithCompilerReport.kt b/compiler/cli/src/org/jetbrains/kotlin/cli/common/messages/AnalyzerWithCompilerReport.kt index 8ee8e78a437..7551bd4d282 100644 --- a/compiler/cli/src/org/jetbrains/kotlin/cli/common/messages/AnalyzerWithCompilerReport.kt +++ b/compiler/cli/src/org/jetbrains/kotlin/cli/common/messages/AnalyzerWithCompilerReport.kt @@ -130,9 +130,7 @@ class AnalyzerWithCompilerReport(private val messageCollector: MessageCollector) } val abiVersionErrors = abiVersionErrors reportDiagnostics(analysisResult.bindingContext.diagnostics, messageCollector, !abiVersionErrors.isEmpty()) - if (hasErrors()) { - reportMetadataVersionErrors(abiVersionErrors) - } + reportMetadataVersionErrors(abiVersionErrors) reportIncompleteHierarchies() reportAlternativeSignatureErrors() } diff --git a/compiler/testData/cli/jvm/wrongAbiVersionNoErrors.kt b/compiler/testData/cli/jvm/wrongAbiVersionNoErrors.kt index 8dc96a5d49b..f60a6d49da2 100644 --- a/compiler/testData/cli/jvm/wrongAbiVersionNoErrors.kt +++ b/compiler/testData/cli/jvm/wrongAbiVersionNoErrors.kt @@ -1,4 +1,4 @@ -// This should compile despite the fact that there are usages of symbols with the wrong ABI version! +// This should not compile because there are usages of symbols with the wrong ABI version! import wrong.ClassWithInnerLambda diff --git a/compiler/testData/cli/jvm/wrongAbiVersionNoErrors.out b/compiler/testData/cli/jvm/wrongAbiVersionNoErrors.out index d86bac9de59..16cbc5fb4ba 100644 --- a/compiler/testData/cli/jvm/wrongAbiVersionNoErrors.out +++ b/compiler/testData/cli/jvm/wrongAbiVersionNoErrors.out @@ -1 +1,2 @@ -OK +compiler/testData/cli/jvm/wrongAbiVersionLib/bin/wrong/ClassWithInnerLambda.class: error: class 'wrong/ClassWithInnerLambda' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 0.30.0, expected version is $ABI_VERSION$ +COMPILATION_ERROR \ No newline at end of file