Fixed codegen for single-branch if
#KT-2597 Fixed #KT-2598 Fixed
This commit is contained in:
@@ -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)
|
||||
Reference in New Issue
Block a user