Java to Kotlin converter: secondary constructors are converted to top-level functions instead of "create" functions in class object
This commit is contained in:
@@ -1,17 +1,14 @@
|
||||
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 __
|
||||
}
|
||||
}
|
||||
fun C(arg1: Int, arg2: Int, other: C): C {
|
||||
val __ = C(arg1, arg2, 0)
|
||||
System.out.println(__.arg1 + other.arg2)
|
||||
return __
|
||||
}
|
||||
|
||||
class C(private val arg1: Int, private val arg2: Int, private val arg3: Int)
|
||||
|
||||
class User {
|
||||
fun foo() {
|
||||
val c1 = C(100, 100, 100)
|
||||
val c2 = C.create(100, 100, c1)
|
||||
val c2 = C(100, 100, c1)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user