[FIR] Add diagnostic for primary constructor not called
This commit is contained in:
@@ -14,7 +14,7 @@ enum class B(x: Int) {
|
||||
|
||||
constructor(x: Int, y: Int): this(x+y)
|
||||
constructor(x: Double): this(x.toInt(), 1)
|
||||
constructor(x: String): super(x, 1)
|
||||
constructor(x: String): <!PRIMARY_CONSTRUCTOR_DELEGATION_CALL_EXPECTED!>super<!>(x, 1)
|
||||
}
|
||||
|
||||
enum class C {
|
||||
|
||||
Vendored
-8
@@ -1,8 +0,0 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
class A(x: Int) {
|
||||
constructor()
|
||||
}
|
||||
open class B(x: Int)
|
||||
class C(x: Int) : B(x) {
|
||||
constructor(): super(1)
|
||||
}
|
||||
Vendored
+1
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
class A(x: Int) {
|
||||
<!PRIMARY_CONSTRUCTOR_DELEGATION_CALL_EXPECTED!>constructor()<!>
|
||||
|
||||
Vendored
+1
-1
@@ -2,6 +2,6 @@
|
||||
open class A(p1: String)
|
||||
|
||||
class B() : A("") {
|
||||
<!INAPPLICABLE_CANDIDATE!>constructor(s: String)<!> {
|
||||
<!INAPPLICABLE_CANDIDATE, PRIMARY_CONSTRUCTOR_DELEGATION_CALL_EXPECTED!>constructor(s: String)<!> {
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user