Report ABI version incompatibility error always, not only if there are other errors
This is a radical but likely temporary measure to forbid the current compiler from compiling code against binaries compiled by newer compilers Cherry picked from commit 149a4eddff0106bbe91c9a6b51a26c12c242d14f and commit 285b20e3ff387eb3d2ee33ceaa376ed8eba90857
This commit is contained in:
+1
-3
@@ -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()
|
||||
}
|
||||
|
||||
+1
-1
@@ -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
|
||||
|
||||
|
||||
+2
-1
@@ -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
|
||||
Reference in New Issue
Block a user