Files
kotlin/compiler/testData/codegen/bytecodeText/controlStructures/kt17110.kt
Mikaël Peltier 9fb0f59813 KT-17110 Rewrite branches targeting other branches
- Rewrite branches targeting other branches to target directly the
final destination to avoid runtime performance penalties.

Fix of https://youtrack.jetbrains.com/issue/KT-17110
2018-02-16 15:15:52 +03:00

21 lines
341 B
Kotlin
Vendored

fun test(x: Int, y: Int): String {
var result: String
if (x == 6) {
if (y == 6) {
result = "a"
} else {
result = "b"
}
} else {
result = "c"
}
return result
}
fun box(): String {
if (test(9, 10) != "c")
return "Failures"
return "OK"
}
// 2 GOTO L7