Files
kotlin-fork/compiler/testData/diagnostics/tests/secondaryConstructors/redeclarations.fir.kt
T
2020-10-01 17:49:02 +03:00

28 lines
611 B
Kotlin
Vendored

// !DIAGNOSTICS: -UNUSED_PARAMETER
class A(x: String = "", y: String = "") {
constructor(x: String, y: String): <!AMBIGUITY!>this<!>(x, y)
constructor(): <!AMBIGUITY!>this<!>("", "")
constructor(): <!AMBIGUITY!>this<!>("", "")
}
class B {
constructor(x: Int)
}
fun B(x: Int) {}
class Outer {
class A(x: String = "", y: String = "") {
constructor(x: String, y: String): <!AMBIGUITY!>this<!>(x, y)
constructor(): <!AMBIGUITY!>this<!>("", "")
constructor(): <!AMBIGUITY!>this<!>("", "")
}
class B {
constructor(x: Int)
}
fun B(x: Int) {}
}