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

28 lines
731 B
Kotlin
Vendored

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