mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-11 15:53:46 +00:00
17 lines
220 B
Kotlin
Vendored
17 lines
220 B
Kotlin
Vendored
package m4
|
|
|
|
import m3.*
|
|
|
|
inline fun foo(action: () -> Int): Int {
|
|
return action()
|
|
}
|
|
|
|
fun bar(): Int {
|
|
foo { return 100 }
|
|
return -99
|
|
}
|
|
|
|
fun box(): String {
|
|
if (bar() == 100) return "OK"
|
|
return "fail"
|
|
} |