FIR: check NAMED_ARGUMENTS_NOT_ALLOWED

The check has already been partially implemented in
org.jetbrains.kotlin.fir.resolve.calls.FirCallArgumentsProcessor. This
change completes the missing piece that determines if a `FirFunction`
has stable parameter names.
This commit is contained in:
Tianyu Geng
2021-03-05 00:12:36 +03:00
committed by Mikhail Glukhikh
parent 0d4e9ca0b9
commit be0dd84a06
19 changed files with 133 additions and 25 deletions
@@ -12,10 +12,10 @@ expect class Foo(zzz: Int) {
expect fun f2(xxx: Int)
fun testCommon() {
Foo(zzz = 0)
val f = Foo(aaa = true)
f.f1(xxx = "")
f2(xxx = 42)
Foo(<!NAMED_ARGUMENTS_NOT_ALLOWED!>zzz = 0<!>)
val f = Foo(<!NAMED_ARGUMENTS_NOT_ALLOWED!>aaa = true<!>)
f.f1(<!NAMED_ARGUMENTS_NOT_ALLOWED!>xxx = ""<!>)
f2(<!NAMED_ARGUMENTS_NOT_ALLOWED!>xxx = 42<!>)
}
// MODULE: m2-jvm(m1-common)