Java to Kotlin converter: secondary constructors are converted to top-level functions instead of "create" functions in class object

This commit is contained in:
Valentin Kipyatkov
2014-06-26 20:01:28 +04:00
parent f698ca69d7
commit 66005a3469
25 changed files with 225 additions and 256 deletions
@@ -1,12 +1,12 @@
fun C(p: Int): C {
val __ = C()
System.out.println(C.staticField1 + C.staticField2)
return __
}
class C {
class object {
private val staticField1 = 0
private val staticField2 = 0
fun create(p: Int): C {
val __ = C()
System.out.println(staticField1 + C.staticField2)
return __
}
}
}
}