mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-08 15:53:19 +00:00
18 lines
235 B
Kotlin
Vendored
18 lines
235 B
Kotlin
Vendored
fun test(
|
|
b: Boolean,
|
|
i: Int
|
|
) {
|
|
if (b) {
|
|
when (i) {
|
|
0 -> foo(1)
|
|
else -> null
|
|
}
|
|
} else null
|
|
}
|
|
|
|
fun foo(i: Int) = i
|
|
|
|
fun box(): String {
|
|
test(true, 1)
|
|
return "OK"
|
|
} |