Files
kotlin-fork/compiler/testData/diagnostics/tests/secondaryConstructors/generics.fir.kt
T
Denis Zharkov a5a93d00a7 FIR: Rework delegation constructor calls resolution
Make it work independently of being called for inner class (as in FE 1.0)
2020-08-11 10:14:02 +03:00

22 lines
496 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) : <!INAPPLICABLE_CANDIDATE!>this<!>(i, 1)
}