[FIR] Check conflicts between nested classes' constructors and member functions

For an example of an object with
an implicit primary constructor,
see `FirPsiOldFrontendDiagnosticsTestGenerated.testSingletonAndFunctionSameName`.

^KT-62005 Fixed


Merge-request: KT-MR-12242
Merged-by: Nikolay Lunyak <Nikolay.Lunyak@jetbrains.com>
This commit is contained in:
Nikolay Lunyak
2023-09-18 11:41:42 +00:00
committed by Space Team
parent 777df2d923
commit 93958ec73d
12 changed files with 95 additions and 14 deletions
@@ -13,15 +13,15 @@ class B {
<!CONFLICTING_OVERLOADS!>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 A<!CONFLICTING_OVERLOADS!>(x: String = "", y: String = "")<!> {
<!CONFLICTING_OVERLOADS!>constructor(x: String, y: String)<!>: <!OVERLOAD_RESOLUTION_AMBIGUITY!>this<!>(x, y)
<!CONFLICTING_OVERLOADS!>constructor()<!>: <!OVERLOAD_RESOLUTION_AMBIGUITY!>this<!>("", "")
<!CONFLICTING_OVERLOADS!>constructor()<!>: <!OVERLOAD_RESOLUTION_AMBIGUITY!>this<!>("", "")
}
class B {
constructor(x: Int)
<!CONFLICTING_OVERLOADS!>constructor(x: Int)<!>
}
fun B(x: Int) {}
<!CONFLICTING_OVERLOADS!>fun B(x: Int)<!> {}
}