Fixed codegen for single-branch if

#KT-2597 Fixed
 #KT-2598 Fixed
This commit is contained in:
Alexander Udalov
2012-08-10 14:38:21 +04:00
parent 4bc1b2636a
commit 9350369fab
5 changed files with 49 additions and 4 deletions
@@ -0,0 +1,10 @@
fun box(): String {
var i = 0
{
if (1 == 1) {
i++
} else {
}
}()
return "OK"
}
@@ -0,0 +1,9 @@
fun foo(condition: Boolean): String {
val u = if (condition) {
"OK"
} else {
}
return u.toString()
}
fun box() = foo(true)