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

19 lines
356 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 foo(x: String, block: (String) -> String) = block(x)
fun box(): String {
fun bar(y: String) = y + "cde"
val res = foo("abc") { bar(it) }
assertEquals("abccde", res)
return "OK"
}