JS: when both clauses of if become empty during optimization, remove if entirely. Make condition and then clause of JsIf non-nullable. Fix #KT-13912
This commit is contained in:
committed by
Alexey Andreev
parent
b5358122e2
commit
d2fdc7ffc0
@@ -0,0 +1,19 @@
|
||||
package foo
|
||||
|
||||
fun test1(): String {
|
||||
run {
|
||||
if (false) {
|
||||
}
|
||||
}
|
||||
return "O"
|
||||
}
|
||||
|
||||
fun test2(): String {
|
||||
1.let {
|
||||
if (false) {
|
||||
}
|
||||
}
|
||||
return "K"
|
||||
}
|
||||
|
||||
fun box() = test1() + test2()
|
||||
Reference in New Issue
Block a user