KJS: Fix loop levels in ContinueReplacingVisitor (KT-24777)

This commit is contained in:
Svyatoslav Kuzmich
2018-06-06 18:32:44 +03:00
parent 2ec8c4aae6
commit 563637548a
5 changed files with 42 additions and 3 deletions
@@ -0,0 +1,24 @@
// EXPECTED_REACHABLE_NODES: 1122
/*
Modified test case from KT-24777
*/
package foo
inline fun condition() = false
fun run(x: Boolean): String {
var y = 0
do {
if (y > 0)
return "NOT OK"
y += 1
do {
} while (false)
if (x) continue
} while (condition())
return "OK"
}
fun box(): String {
return run(true)
}