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

13 lines
324 B
Kotlin
Vendored

// !DIAGNOSTICS: -UNUSED_PARAMETER
fun <T> array(vararg x: T): Array<T> = null!!
open class B(vararg y: String) {
constructor(x: Int): this(x.toString(), *array("1"), "2")
}
class A : B {
constructor(x: String, y: String): super(x, *array("3"), y)
constructor(x: String): super(x)
constructor(): super()
}