Files
kotlin-fork/compiler/testData/codegen/box/controlStructures/kt3203_2.kt
T
2018-06-09 19:15:38 +03:00

22 lines
385 B
Kotlin
Vendored

// IGNORE_BACKEND: JS_IR
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"
}