Files
kotlin-fork/compiler/testData/diagnostics/tests/secondaryConstructors/initializationFromOtherInstance.kt
T
Denis Zharkov 01e5ee718f Allow secondary constructors without body
#KT-6967 Fixed
2015-03-27 16:09:40 +03:00

16 lines
282 B
Kotlin

class A {
val x: Int
val y: Int
constructor(x: Int, y: Int) {
this.x = x
this.y = y
}
constructor(other: A) {
x = other.x
y = other.y
}
}
class A1(val x: Int, val y: Int) {
constructor(other: A1): this(other.x, other.y)
}