Files
kotlin/compiler/testData/codegen/box/functions/localFunctions/callInlineLocalInLambda.kt
2019-11-19 11:00:09 +03:00

17 lines
290 B
Kotlin
Vendored

// IGNORE_BACKEND_FIR: JVM_IR
// 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"
}