[FIR] Report conflicts for constructors of top-level classes
^KT-59880
This commit is contained in:
committed by
Space Team
parent
bc2eb546b4
commit
09436d0480
Vendored
+2
-2
@@ -1,5 +1,5 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
open class B(x: Int)
|
||||
<!SUPERTYPE_INITIALIZED_WITHOUT_PRIMARY_CONSTRUCTOR!>class A : B(1) {
|
||||
constructor(): super(1)
|
||||
<!SUPERTYPE_INITIALIZED_WITHOUT_PRIMARY_CONSTRUCTOR!>class <!CONFLICTING_OVERLOADS!>A<!> : B(1) {
|
||||
<!CONFLICTING_OVERLOADS!>constructor()<!>: super(1)
|
||||
}<!>
|
||||
|
||||
-27
@@ -1,27 +0,0 @@
|
||||
// !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 {
|
||||
<!CONFLICTING_OVERLOADS!>constructor(x: Int)<!>
|
||||
}
|
||||
|
||||
<!CONFLICTING_OVERLOADS!>fun B(x: Int)<!> {}
|
||||
|
||||
class Outer {
|
||||
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 {
|
||||
<!CONFLICTING_OVERLOADS!>constructor(x: Int)<!>
|
||||
}
|
||||
|
||||
<!CONFLICTING_OVERLOADS!>fun B(x: Int)<!> {}
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
|
||||
class A<!CONFLICTING_OVERLOADS!>(x: String = "", y: String = "")<!> {
|
||||
|
||||
Reference in New Issue
Block a user