KT-6476 Kotlin J2K converter fails with for-loops with continues

#KT-6476 Fixed
This commit is contained in:
Valentin Kipyatkov
2015-03-25 22:20:29 +03:00
parent 2d4055e921
commit e31648a4b6
14 changed files with 280 additions and 58 deletions
@@ -0,0 +1,34 @@
// ERROR: The label '@OuterLoop1' does not denote a loop
public class TestClass {
companion object {
public fun main(args: Array<String>) {
run {
var i = 1
@OuterLoop1 @OuterLoop2 while (i < 1000) {
run {
var j = 1
@InnerLoop while (j < 100) {
if (j == 3) {
j *= 3
continue@InnerLoop
}
if (i == j) {
i *= 2
continue@OuterLoop1
}
System.err.println(j)
if (j == 9) {
j *= 3
continue
}
j *= 3
}
}
i *= 2
}
}
}
}
}
fun main(args: Array<String>) = TestClass.main(args)