Files
kotlin-fork/compiler/testData/diagnostics/tests/secondaryConstructors/errorsOnEmptyDelegationCall.fir.kt
T
Tianyu Geng 761a0a7d0d FIR checkers: report specific errors instead of INAPPLICABLE_CANDIDATE
Specifically, the report the following 4 errors.

* NON_VARARG_SPREAD
* ARGUMENT_PASSED_TWICE
* TOO_MANY_ARGUMENTS
* NO_VALUE_FOR_PARAMETER

Also added/updated the following position strategies.
* NAME_OF_NAMED_ARGUMENT
* VALUE_ARGUMENTS
2021-04-02 14:36:14 +03:00

43 lines
718 B
Kotlin
Vendored

// !DIAGNOSTICS: -UNUSED_PARAMETER
open class B0(x: Int)
class A0 : B0 {
constructor()
constructor(x: Int) : <!NO_VALUE_FOR_PARAMETER!>super<!>()
}
// --------------------------
open class B1 {
constructor(x: Int = 1)
constructor()
}
class A1 : B1 {
constructor()
constructor(x: Int) : 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 {
constructor()
constructor(x: Int) : <!HIDDEN!>super<!>()
}