Files
kotlin-fork/compiler/testData/diagnostics/tests/secondaryConstructors/generics.kt
T

22 lines
487 B
Kotlin
Vendored

// !DIAGNOSTICS: -UNUSED_PARAMETER -UNREACHABLE_CODE
open class B<T>(x: T, y: T) {
constructor(x: T): this(x, x)
constructor(): this(null!!, null!!)
}
class A0 : B<String?> {
constructor()
constructor(x: String): super(x)
constructor(x: String, y: String): super(x, y)
}
class A1<R> : B<R> {
constructor()
constructor(x: R): super(x)
constructor(x: R, y: R): super(x, y)
}
class A2<R> {
constructor(t: R, i: Int) : this(<!TYPE_MISMATCH!>i<!>, 1)
}