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
@@ -0,0 +1,17 @@
/*
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
package org.jetbrains.kotlin.resolve
enum class BadNamedArgumentsTarget(private val description:String) {
NON_KOTLIN_FUNCTION("non-Kotlin functions"), // a function provided by non-Kotlin artifact, ex: Java function
INVOKE_ON_FUNCTION_TYPE("function types"),
EXPECTED_CLASS_MEMBER("members of expected classes"),
// TODO: add the following when MPP support is available
// INTEROP_FUNCTION("interop functions with ambiguous parameter names"), // deserialized Kotlin function that serves as a bridge to a function written in another language, ex: Obj-C
;
override fun toString(): String = description
}