[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:
committed by
Space Team
parent
777df2d923
commit
93958ec73d
+6
-6
@@ -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)<!> {}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user