KT-6798 J2K: Needless use of run {} function after converting for-loop

#KT-6798 Fixed
This commit is contained in:
Valentin Kipyatkov
2015-03-26 19:04:05 +03:00
parent 46193f3ef7
commit 6dbb13c32d
28 changed files with 373 additions and 113 deletions
@@ -2,30 +2,26 @@
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
}
var i = 1
@OuterLoop1 @OuterLoop2 while (i < 1000) {
var j = 1
@InnerLoop while (j < 100) {
if (j == 3) {
j *= 3
continue@InnerLoop
}
i *= 2
if (i == j) {
i *= 2
continue@OuterLoop1
}
System.err.println(j)
if (j == 9) {
j *= 3
continue
}
j *= 3
}
i *= 2
}
}
}