KT-5287 J2K: Convert class with private constructor and static functions to "object" instead of class with "class object"

#KT-5287 Fixed
This commit is contained in:
Valentin Kipyatkov
2015-03-27 13:55:47 +03:00
parent 6dbb13c32d
commit f19eb20803
63 changed files with 550 additions and 482 deletions
@@ -1,28 +1,26 @@
// ERROR: The label '@OuterLoop1' does not denote a loop
public class TestClass {
companion object {
public fun main(args: Array<String>) {
var i = 1
@OuterLoop1 @OuterLoop2 while (i < 1000) {
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
}
public object TestClass {
public fun main(args: Array<String>) {
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
}
}
}