[FIR] Add diagnostic for constructor delegation cycles
This commit is contained in:
@@ -3,13 +3,13 @@
|
||||
open class B<R1, R2>(x: R1, y: R2)
|
||||
|
||||
class A0<T1, T2> {
|
||||
constructor(x: T1, y: T2): this(x, y)
|
||||
constructor(x: T1, y: T2): <!CYCLIC_CONSTRUCTOR_DELEGATION_CALL!>this<!>(x, y)
|
||||
|
||||
constructor(x: T1, y: T2, z: T2): this(x, 1) // ok, delegates to constructor(x: T1, y: Int)
|
||||
constructor(x: T1, y: T2, z: T2): <!CYCLIC_CONSTRUCTOR_DELEGATION_CALL!>this<!>(x, 1) // ok, delegates to constructor(x: T1, y: Int)
|
||||
|
||||
constructor(x: T1, y: Int): this(x, "")
|
||||
constructor(x: T1): this(x, 1)
|
||||
constructor(x: T1, y: T2, z: String): this(y, x)
|
||||
constructor(x: T1, y: Int): <!CYCLIC_CONSTRUCTOR_DELEGATION_CALL!>this<!>(x, "")
|
||||
constructor(x: T1): <!CYCLIC_CONSTRUCTOR_DELEGATION_CALL!>this<!>(x, 1)
|
||||
constructor(x: T1, y: T2, z: String): <!CYCLIC_CONSTRUCTOR_DELEGATION_CALL!>this<!>(y, x)
|
||||
}
|
||||
|
||||
class A1<T1, T2> : B<T1, T2> {
|
||||
|
||||
Reference in New Issue
Block a user