Files
kotlin/compiler/testData/codegen/bytecodeText/statements/statementsComposition.kt
Denis Zharkov 4ed744428b Generate substatements as statements too
Preventing pushing on stack redundant Unit instances

 #KT-5667 fixed
2014-09-24 15:51:43 +04:00

37 lines
829 B
Kotlin
Vendored

fun foo() {
val array = intArray(1,2,3)
var count = 0
for (element in array) if (element > 0) count++
while (count > 0) if (count > 0) count++
if (count == 1)
if (count != 1)
count++
else
print("1")
else
print("2")
when (count) {
1 -> if (count == 1) count++ else print("123")
else -> if (count == 1) count++ else print("123")
}
for (element in array)
when (element) {
1 -> if (count == 1) count++ else print("123")
else -> if (count == 1) count++ else print("123")
}
while (count > 0)
when (count) {
1 -> if (count == 1) count++ else print("123")
else -> if (count == 1) count++ else print("123")
}
}
// 0 valueOf
// 0 GETSTATIC