FIR: forbid reporting inapplicable-likes on implicit constructors
This commit is contained in:
Vendored
+1
-1
@@ -8,7 +8,7 @@ expect open class A {
|
||||
}
|
||||
|
||||
expect class B : A {
|
||||
<!EXPLICIT_DELEGATION_CALL_REQUIRED, NONE_APPLICABLE!>constructor(i: Int)<!>
|
||||
<!EXPLICIT_DELEGATION_CALL_REQUIRED!>constructor(i: Int)<!>
|
||||
|
||||
constructor() : super("B")
|
||||
}
|
||||
|
||||
Vendored
+3
-3
@@ -2,7 +2,7 @@
|
||||
open class B0(x: Int)
|
||||
|
||||
class A0 : B0 {
|
||||
<!INAPPLICABLE_CANDIDATE!>constructor()<!>
|
||||
constructor()
|
||||
constructor(x: Int) : <!INAPPLICABLE_CANDIDATE!>super<!>()
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ open class B2 {
|
||||
}
|
||||
|
||||
class A2 : B2 {
|
||||
<!EXPLICIT_DELEGATION_CALL_REQUIRED, NONE_APPLICABLE!>constructor()<!>
|
||||
<!EXPLICIT_DELEGATION_CALL_REQUIRED!>constructor()<!>
|
||||
constructor(x: Int) : <!NONE_APPLICABLE!>super<!>()
|
||||
}
|
||||
|
||||
@@ -37,6 +37,6 @@ open class B3 {
|
||||
}
|
||||
|
||||
class A3 : B3 {
|
||||
<!HIDDEN!>constructor()<!>
|
||||
constructor()
|
||||
constructor(x: Int) : <!HIDDEN!>super<!>()
|
||||
}
|
||||
|
||||
Vendored
-7
@@ -1,7 +0,0 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
open class A(p1: String)
|
||||
|
||||
class B() : A("") {
|
||||
<!PRIMARY_CONSTRUCTOR_DELEGATION_CALL_EXPECTED!>constructor(s: String)<!><!INAPPLICABLE_CANDIDATE!><!> {
|
||||
}
|
||||
}
|
||||
Vendored
+1
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
open class A(p1: String)
|
||||
|
||||
|
||||
+1
-1
@@ -2,6 +2,6 @@ class A {
|
||||
open inner class Inner
|
||||
|
||||
class Nested : Inner {
|
||||
constructor()<!UNRESOLVED_REFERENCE!><!>
|
||||
constructor()
|
||||
}
|
||||
}
|
||||
|
||||
compiler/testData/diagnostics/tests/secondaryConstructors/reportResolutionErrorOnImplicitOnce.fir.kt
Vendored
+1
-1
@@ -2,5 +2,5 @@
|
||||
open class A(p1: String, p2: String, p3: String, p4: String, p5: String)
|
||||
|
||||
class B : A {
|
||||
constructor(s: String)<!INAPPLICABLE_CANDIDATE!><!>
|
||||
constructor(s: String)
|
||||
}
|
||||
|
||||
-10
@@ -1,10 +0,0 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
open class B(x: Double) {
|
||||
constructor(x: Int): this(1.0)
|
||||
constructor(x: String): this(1.0)
|
||||
}
|
||||
interface C
|
||||
class A : B, C {
|
||||
constructor(): <!NONE_APPLICABLE!>super<!>(' ')
|
||||
<!EXPLICIT_DELEGATION_CALL_REQUIRED, NONE_APPLICABLE!>constructor(x: Int)<!>
|
||||
}
|
||||
+1
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
open class B(x: Double) {
|
||||
constructor(x: Int): this(1.0)
|
||||
|
||||
Reference in New Issue
Block a user