testData for binary compatibility tests on klib library evolution

This commit is contained in:
Alexander Gorshenev
2020-12-23 07:24:10 +03:00
parent 3704b2a5af
commit 504bdfc283
39 changed files with 1910 additions and 0 deletions
@@ -0,0 +1,31 @@
// MODULE: lib
// FILE: A.kt
// VERSION: 1
class X {
fun foo() = "without companion"
}
// FILE: B.kt
// VERSION: 2
class X {
fun foo() = "with companion"
companion object {
val bar = "this is a companion"
}
}
// MODULE: mainLib(lib)
// FILE: mainLib.kt
fun lib(): String = when {
X().foo() != "with companion" -> "fail 1"
else -> "OK"
}
// MODULE: main(mainLib)
// FILE: main.kt
fun box(): String = lib()