Unify reporting resolution errors for empty delegation calls
- Always report "There is no applicable constructor for call without arguments in superclass" under `constructor` keyword by replacing default TracingStrategy - Remove positioning strategy used for reporting non-applicable for empty delegation calls #KT-6971 Fixed
This commit is contained in:
+42
@@ -0,0 +1,42 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
open class B0(x: Int)
|
||||
|
||||
class A0 : B0 {
|
||||
<!EXPLICIT_DELEGATION_CALL_REQUIRED!>constructor<!>()
|
||||
constructor(x: Int) : super(<!NO_VALUE_FOR_PARAMETER!>)<!>
|
||||
}
|
||||
|
||||
// --------------------------
|
||||
|
||||
open class B1 {
|
||||
constructor(x: Int = 1)
|
||||
constructor()
|
||||
}
|
||||
|
||||
class A1 : B1 {
|
||||
<!EXPLICIT_DELEGATION_CALL_REQUIRED!>constructor<!>()
|
||||
constructor(x: Int) : <!OVERLOAD_RESOLUTION_AMBIGUITY!>super<!>()
|
||||
}
|
||||
|
||||
// --------------------------
|
||||
|
||||
open class B2 {
|
||||
constructor(x: Int)
|
||||
constructor(x: String)
|
||||
}
|
||||
|
||||
class A2 : B2 {
|
||||
<!EXPLICIT_DELEGATION_CALL_REQUIRED!>constructor<!>()
|
||||
constructor(x: Int) : <!NONE_APPLICABLE!>super<!>()
|
||||
}
|
||||
|
||||
// --------------------------
|
||||
|
||||
open class B3 {
|
||||
private constructor()
|
||||
}
|
||||
|
||||
class A3 : B3 {
|
||||
<!EXPLICIT_DELEGATION_CALL_REQUIRED!>constructor<!>()
|
||||
constructor(x: Int) : <!INVISIBLE_MEMBER!>super<!>()
|
||||
}
|
||||
Reference in New Issue
Block a user