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

15 lines
270 B
Kotlin

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"
}