[KLIB][tests] Keep "klib evolution" test data under "testData/klib/" dir

This commit is contained in:
Dmitriy Dolovov
2023-08-15 14:47:24 +02:00
committed by Space Team
parent d7e9fcea04
commit 60b950b9bd
46 changed files with 173 additions and 174 deletions
+42
View File
@@ -0,0 +1,42 @@
// MODULE: base
// FILE: A.kt
// VERSION: 1
open class X
// FILE: B.kt
// VERSION: 2
open class X {
open fun foo(): String = "new member"
}
// MODULE: child(base)
// FILE: C.kt
class Y: X()
// MODULE: lib(child)
// FILE: D.kt
// VERSION: 1
fun qux(): String = "no foo() exists in ${Y()}"
// FILE: E.kt
// VERSION: 2
fun qux(): String = Y().foo()
// MODULE: mainLib(lib)
// FILE: mainLib.kt
fun lib(): String = when {
qux() != "new member" -> "fail 1"
else -> "OK"
}
// MODULE: main(mainLib)
// FILE: main.kt
fun box(): String = lib()