FIR: Introduce NAMED_PARAMETER_NOT_FOUND diagnostic

This commit is contained in:
Denis.Zharkov
2021-04-02 13:37:59 +03:00
committed by TeamCityServer
parent 2d42e64c17
commit 0637748f10
31 changed files with 103 additions and 66 deletions
@@ -0,0 +1,6 @@
FILE: noParameterForName.kt
public final fun foo(x: R|kotlin/Int|): R|kotlin/Unit| {
}
public final fun bar(): R|kotlin/Unit| {
<Inapplicable(INAPPLICABLE_ARGUMENTS_MAPPING_ERROR): /foo>#(y = Int(1))
}
@@ -0,0 +1,5 @@
fun foo(x: Int) {}
fun bar() {
foo(<!NAMED_PARAMETER_NOT_FOUND!>y<!> = 1<!NO_VALUE_FOR_PARAMETER!>)<!>
}
@@ -13,5 +13,5 @@ fun test() {
foo(second = 0.0, first = 0, fourth = ""<!NO_VALUE_FOR_PARAMETER!>)<!>
<!INAPPLICABLE_CANDIDATE!>foo<!>(first = 0.0, second = 0, third = "", fourth = false)
foo(first = 0, second = 0.0, third = false, fourth = "", <!ARGUMENT_PASSED_TWICE!>first<!> = 1)
foo(0, 0.0, false, foth = ""<!NO_VALUE_FOR_PARAMETER!>)<!>
foo(0, 0.0, false, <!NAMED_PARAMETER_NOT_FOUND!>foth<!> = ""<!NO_VALUE_FOR_PARAMETER!>)<!>
}