Files
kotlin-fork/compiler/testData/diagnostics/tests/resolve/invoke/functionExpectedWhenSeveralInvokesExist.fir.kt
T
Dmitriy Novozhilov f283f2db43 [FIR] Improve diagnostic reporting & don't use error symbol for candidate if possible
Also introduce few new diagnostics:
- NONE_APPLICABLE more many inapplicable candidates
- HIDDEN for visible candidates
2020-07-28 20:46:56 +03:00

15 lines
374 B
Kotlin
Vendored

// !WITH_NEW_INFERENCE
// !DIAGNOSTICS: -UNUSED_PARAMETER
fun Int.invoke(a: Int) {}
fun Int.invoke(a: Int, b: Int) {}
class SomeClass
fun test(identifier: SomeClass, fn: String.() -> Unit) {
<!NONE_APPLICABLE!>identifier<!>()
<!INAPPLICABLE_CANDIDATE!>identifier<!>(123)
<!INAPPLICABLE_CANDIDATE!>identifier<!>(1, 2)
1.<!INAPPLICABLE_CANDIDATE!>fn<!>()
}