Files
kotlin-fork/compiler/testData/codegen/box/functions/localFunctions/definedWithinLambdaInnerUsage1.kt
T
2018-06-09 19:15:38 +03:00

18 lines
312 B
Kotlin
Vendored

// IGNORE_BACKEND: JS_IR
// WITH_RUNTIME
import kotlin.test.assertEquals
inline fun foo(x: String, block: (String) -> String) = block(x)
fun box(): String {
val res = foo("abc") {
fun bar(y: String) = y + "cde"
foo(it) { bar(it) }
}
assertEquals("abccde", res)
return "OK"
}