KT-3268 Check binary format version in the compiler
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
import wrong.*
|
||||
|
||||
fun foo(x: ClassWithWrongAbiVersion) {
|
||||
bar()
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
WARNING: $TESTDATA_DIR$/wrongAbiVersion.kt: (3, 9) Parameter 'x' is never used
|
||||
ERROR: $TESTDATA_DIR$/wrongAbiVersionLib/wrong/WrongPackage.java: (3, 1) Class 'wrong.WrongPackage' was compiled with an incompatible version of Kotlin. Its ABI version is -1, expected ABI version is 0
|
||||
ERROR: $TESTDATA_DIR$/wrongAbiVersionLib/ClassWithWrongAbiVersion.java: (3, 1) Class 'ClassWithWrongAbiVersion' was compiled with an incompatible version of Kotlin. Its ABI version is -1, expected ABI version is 0
|
||||
COMPILATION_ERROR
|
||||
@@ -0,0 +1,4 @@
|
||||
import jet.runtime.typeinfo.JetClass;
|
||||
|
||||
@JetClass("Ljava/lang/Object;", 16, -1)
|
||||
class ClassWithWrongAbiVersion {}
|
||||
@@ -0,0 +1,6 @@
|
||||
package wrong;
|
||||
|
||||
@jet.runtime.typeinfo.JetPackageClass(abiVersion = -1)
|
||||
public class WrongPackage {
|
||||
public static void bar() {}
|
||||
}
|
||||
Reference in New Issue
Block a user