Files
kotlin-fork/compiler/testData/codegen/box/storeStackBeforeInline/withLambda.kt
T
2019-11-19 11:00:09 +03:00

17 lines
378 B
Kotlin
Vendored

// IGNORE_BACKEND_FIR: JVM_IR
// WITH_RUNTIME
import kotlin.test.assertEquals
inline fun bar(x: String, block: (String) -> String) = "def" + block(x)
fun foobar(x: String, y: String, z: String) = x + y + z
fun foo() : String {
return foobar("abc", bar("ghi") { x -> x + "jkl" }, "mno")
}
fun box() : String {
assertEquals("abcdefghijklmno", foo())
return "OK"
}