mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-09 00:21:47 +00:00
18 lines
383 B
Kotlin
Vendored
18 lines
383 B
Kotlin
Vendored
// IGNORE_BACKEND: JVM_IR
|
|
inline fun bar(block: () -> String) : String {
|
|
return block()
|
|
}
|
|
|
|
inline fun bar2() : String {
|
|
while (true) break
|
|
return bar { return "def" }
|
|
}
|
|
|
|
fun foobar(x: String, y: String, z: String) = x + y + z
|
|
|
|
fun box(): String {
|
|
val test = foobar("abc", bar2(), "ghi")
|
|
return if (test == "abcdefghi")
|
|
"OK"
|
|
else "Failed, test=$test"
|
|
} |