Files
kotlin-fork/compiler/testData/codegen/box/storeStackBeforeInline/withLambda.kt
T
2016-11-09 21:41:12 +03:00

19 lines
444 B
Kotlin
Vendored

// TODO: muted automatically, investigate should it be ran for JS or not
// IGNORE_BACKEND: JS
// 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"
}