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

21 lines
366 B
Kotlin
Vendored

// IGNORE_BACKEND: JS_IR
fun testIf() {
val condition = true
val result = if (condition) {
val hello: String? = "hello"
if (hello == null) {
false
}
else {
true
}
}
else true
if (!result) throw AssertionError("result is false")
}
fun box(): String {
testIf()
return "OK"
}