Report incompatible metadata version error correctly
Similarly to pre-release classes, load metadata for the class anyway and allow the resolution to select it as the result and prohibit its usage in the end with the special diagnostic reported in MissingDependencyClassChecker
This commit is contained in:
+11
@@ -0,0 +1,11 @@
|
||||
package a
|
||||
|
||||
open class A {
|
||||
class Nested
|
||||
|
||||
fun method() {}
|
||||
}
|
||||
|
||||
fun foo() {}
|
||||
var bar = 42
|
||||
typealias TA = String
|
||||
+49
@@ -0,0 +1,49 @@
|
||||
compiler/testData/compileKotlinAgainstCustomBinaries/wrongMetadataVersion/source.kt:5:16: error: class 'a.A' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 42.0.0, expected version is $ABI_VERSION$.
|
||||
The class is loaded from $TMP_DIR$/library-after.jar!/a/A.class
|
||||
fun baz(param: A, nested: A.Nested) {
|
||||
^
|
||||
compiler/testData/compileKotlinAgainstCustomBinaries/wrongMetadataVersion/source.kt:5:27: error: class 'a.A' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 42.0.0, expected version is $ABI_VERSION$.
|
||||
The class is loaded from $TMP_DIR$/library-after.jar!/a/A.class
|
||||
fun baz(param: A, nested: A.Nested) {
|
||||
^
|
||||
compiler/testData/compileKotlinAgainstCustomBinaries/wrongMetadataVersion/source.kt:5:29: error: class 'a.A.Nested' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 42.0.0, expected version is $ABI_VERSION$.
|
||||
The class is loaded from $TMP_DIR$/library-after.jar!/a/A$Nested.class
|
||||
fun baz(param: A, nested: A.Nested) {
|
||||
^
|
||||
compiler/testData/compileKotlinAgainstCustomBinaries/wrongMetadataVersion/source.kt:6:23: error: class 'a.A' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 42.0.0, expected version is $ABI_VERSION$.
|
||||
The class is loaded from $TMP_DIR$/library-after.jar!/a/A.class
|
||||
val constructor = A()
|
||||
^
|
||||
compiler/testData/compileKotlinAgainstCustomBinaries/wrongMetadataVersion/source.kt:7:18: error: class 'a.A' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 42.0.0, expected version is $ABI_VERSION$.
|
||||
The class is loaded from $TMP_DIR$/library-after.jar!/a/A.class
|
||||
val nested = A.Nested()
|
||||
^
|
||||
compiler/testData/compileKotlinAgainstCustomBinaries/wrongMetadataVersion/source.kt:7:20: error: class 'a.A.Nested' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 42.0.0, expected version is $ABI_VERSION$.
|
||||
The class is loaded from $TMP_DIR$/library-after.jar!/a/A$Nested.class
|
||||
val nested = A.Nested()
|
||||
^
|
||||
compiler/testData/compileKotlinAgainstCustomBinaries/wrongMetadataVersion/source.kt:8:22: error: class 'a.A' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 42.0.0, expected version is $ABI_VERSION$.
|
||||
The class is loaded from $TMP_DIR$/library-after.jar!/a/A.class
|
||||
val methodCall = param.method()
|
||||
^
|
||||
compiler/testData/compileKotlinAgainstCustomBinaries/wrongMetadataVersion/source.kt:9:30: error: class 'a.A' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 42.0.0, expected version is $ABI_VERSION$.
|
||||
The class is loaded from $TMP_DIR$/library-after.jar!/a/A.class
|
||||
val supertype = object : A() {}
|
||||
^
|
||||
compiler/testData/compileKotlinAgainstCustomBinaries/wrongMetadataVersion/source.kt:11:13: error: class 'a.AKt' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 42.0.0, expected version is $ABI_VERSION$.
|
||||
The class is loaded from $TMP_DIR$/library-after.jar!/a/AKt.class
|
||||
val x = foo()
|
||||
^
|
||||
compiler/testData/compileKotlinAgainstCustomBinaries/wrongMetadataVersion/source.kt:12:13: error: class 'a.AKt' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 42.0.0, expected version is $ABI_VERSION$.
|
||||
The class is loaded from $TMP_DIR$/library-after.jar!/a/AKt.class
|
||||
val y = bar
|
||||
^
|
||||
compiler/testData/compileKotlinAgainstCustomBinaries/wrongMetadataVersion/source.kt:13:5: error: class 'a.AKt' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 42.0.0, expected version is $ABI_VERSION$.
|
||||
The class is loaded from $TMP_DIR$/library-after.jar!/a/AKt.class
|
||||
bar = 239
|
||||
^
|
||||
compiler/testData/compileKotlinAgainstCustomBinaries/wrongMetadataVersion/source.kt:14:12: error: class 'a.AKt' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 42.0.0, expected version is $ABI_VERSION$.
|
||||
The class is loaded from $TMP_DIR$/library-after.jar!/a/AKt.class
|
||||
val z: TA = ""
|
||||
^
|
||||
COMPILATION_ERROR
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
package usage
|
||||
|
||||
import a.*
|
||||
|
||||
fun baz(param: A, nested: A.Nested) {
|
||||
val constructor = A()
|
||||
val nested = A.Nested()
|
||||
val methodCall = param.method()
|
||||
val supertype = object : A() {}
|
||||
|
||||
val x = foo()
|
||||
val y = bar
|
||||
bar = 239
|
||||
val z: TA = ""
|
||||
}
|
||||
Reference in New Issue
Block a user