KT-23931 Avoid infinite loop into RedundantGotoMethodTransformer

- Follow-up of 9fb0f59813 to avoid
infinite loop during redundant goto otpimization.

Fix of https://youtrack.jetbrains.com/issue/KT-23931
This commit is contained in:
Mikaël Peltier
2018-04-22 11:18:16 +02:00
committed by Stanislav Erokhin
parent 7daf44a806
commit b1ef670818
2 changed files with 21 additions and 11 deletions

View File

@@ -12,10 +12,9 @@ fun test(x: Int, y: Int): String {
return result
}
fun box(): String {
if (test(9, 10) != "c")
return "Failures"
return "OK"
fun infiniteLoop() {
while(true) {}
}
// 2 GOTO L7
// 2 GOTO L7
// 1 GOTO L1