mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-16 08:31:35 +00:00
* Move FinallyBlockLowering to common part * Fix catching of dynamic exception * Fix bridges for suspend functions * Disable explicit cast to Unit * Run lowering per module * Update some test data
16 lines
348 B
Kotlin
Vendored
16 lines
348 B
Kotlin
Vendored
// WITH_RUNTIME
|
|
|
|
import kotlin.test.assertEquals
|
|
|
|
inline fun bar(x: String, block: (String) -> String) = "def" + block(x)
|
|
fun foobar(x: String, y: String, z: String) = x + y + z
|
|
|
|
fun foo() : String {
|
|
return foobar("abc", bar("ghi") { x -> x + "jkl" }, "mno")
|
|
}
|
|
|
|
fun box() : String {
|
|
assertEquals("abcdefghijklmno", foo())
|
|
return "OK"
|
|
}
|