K2 Scripting: restore some codegen scripting tests for K2
This commit is contained in:
committed by
Space Team
parent
a83d2b7a67
commit
3b70b3d92d
@@ -0,0 +1,31 @@
|
||||
// TARGET_BACKEND: JVM
|
||||
// IGNORE_BACKEND_K1: JVM, JVM_IR, JS_IR, JS_IR_ES6
|
||||
// IGNORE_LIGHT_ANALYSIS
|
||||
// WITH_STDLIB
|
||||
// FILE: test.kt
|
||||
|
||||
fun box(): String =
|
||||
Build.Debug.run { "${c0()}${c1()}" }
|
||||
|
||||
// FILE: script.kts
|
||||
|
||||
interface Base {
|
||||
val v: String
|
||||
|
||||
fun c0(): Char {
|
||||
fun getC0() = v[0]
|
||||
return getC0()
|
||||
}
|
||||
}
|
||||
|
||||
enum class Build(override val v: String): Base {
|
||||
Debug("OK"),
|
||||
Release("NO");
|
||||
|
||||
fun c1(): Char {
|
||||
val g = object {
|
||||
val c1 = v[1]
|
||||
}
|
||||
return g.c1
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user