mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-12 08:31:28 +00:00
21 lines
360 B
Kotlin
Vendored
21 lines
360 B
Kotlin
Vendored
fun check1() {
|
|
val result = if (true) {
|
|
if (true) 1 else 2
|
|
}
|
|
else 3
|
|
if (result != 1) throw AssertionError("result: $result")
|
|
}
|
|
|
|
fun check2() {
|
|
val result = if (true)
|
|
if (true) 1 else 2
|
|
else 3
|
|
if (result != 1) throw AssertionError("result: $result")
|
|
}
|
|
|
|
fun box(): String {
|
|
check1()
|
|
check2()
|
|
return "OK"
|
|
}
|