Files
kotlin/compiler/testData/codegen/boxWithStdlib/localFunInLambda/definedWithinLambda.kt
2014-11-13 20:56:08 +03:00

15 lines
258 B
Kotlin
Vendored

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"
bar(it)
}
assertEquals("abccde", res)
return "OK"
}