KT-3268 Check binary format version in the compiler

This commit is contained in:
Andrey Breslav
2013-01-21 20:01:23 -08:00
parent 2cb530a6d1
commit 0dc24bcd92
12 changed files with 130 additions and 3 deletions
+5
View File
@@ -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() {}
}