[FIR] Add diagnostic for constructor delegation cycles
This commit is contained in:
+6
-6
@@ -1,9 +1,9 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
|
||||
class A(x: String = "", y: String = "") {
|
||||
constructor(x: String, y: String): this(x, y)
|
||||
constructor(): this("", "")
|
||||
constructor(): this("", "")
|
||||
constructor(x: String, y: String): <!CYCLIC_CONSTRUCTOR_DELEGATION_CALL!>this<!>(x, y)
|
||||
constructor(): <!CYCLIC_CONSTRUCTOR_DELEGATION_CALL!>this<!>("", "")
|
||||
constructor(): <!CYCLIC_CONSTRUCTOR_DELEGATION_CALL!>this<!>("", "")
|
||||
}
|
||||
|
||||
class B {
|
||||
@@ -14,9 +14,9 @@ fun B(x: Int) {}
|
||||
|
||||
class Outer {
|
||||
class A(x: String = "", y: String = "") {
|
||||
constructor(x: String, y: String): this(x, y)
|
||||
constructor(): this("", "")
|
||||
constructor(): this("", "")
|
||||
constructor(x: String, y: String): <!CYCLIC_CONSTRUCTOR_DELEGATION_CALL!>this<!>(x, y)
|
||||
constructor(): <!CYCLIC_CONSTRUCTOR_DELEGATION_CALL!>this<!>("", "")
|
||||
constructor(): <!CYCLIC_CONSTRUCTOR_DELEGATION_CALL!>this<!>("", "")
|
||||
}
|
||||
|
||||
class B {
|
||||
|
||||
Reference in New Issue
Block a user