Java to Kotlin converter: fixed bug with secondary constructor conversion

This commit is contained in:
Valentin Kipyatkov
2014-06-25 20:20:53 +04:00
parent 0edd9d24be
commit 467ca77854
4 changed files with 62 additions and 9 deletions
@@ -0,0 +1,17 @@
class C(private val arg1: Int, private val arg2: Int, private val arg3: Int) {
class object {
fun create(arg1: Int, arg2: Int, other: C): C {
val __ = C(arg1, arg2, 0)
System.out.println(__.arg1 + other.arg2)
return __
}
}
}
class User {
fun foo() {
val c1 = C(100, 100, 100)
val c2 = C.create(100, 100, c1)
}
}