Files
kotlin/compiler/testData/codegen/box/controlStructures/kt3203_1.kt
2018-06-19 17:09:31 +03:00

20 lines
341 B
Kotlin
Vendored

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"
}