mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-09 00:21:47 +00:00
- Follow-up of 9fb0f59813 to avoid
infinite loop during redundant goto otpimization.
Fix of https://youtrack.jetbrains.com/issue/KT-23931
20 lines
304 B
Kotlin
Vendored
20 lines
304 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 infiniteLoop() {
|
|
while(true) {}
|
|
}
|
|
|
|
// 2 GOTO L7
|
|
// 1 GOTO L1 |