mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-18 00:21:35 +00:00
21 lines
456 B
Kotlin
Vendored
21 lines
456 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 noInlineFoo(x: String, block: (String) -> String) = block(x)
|
|
|
|
fun box(): String {
|
|
val res = foo("abc") {
|
|
fun bar(y: String) = y + "cde"
|
|
noInlineFoo(it) { bar(it) }
|
|
}
|
|
|
|
assertEquals("abccde", res)
|
|
|
|
return "OK"
|
|
}
|