Files
kotlin-fork/compiler/testData/diagnostics/tests/resolve/invoke/functionExpectedWhenSeveralInvokesExist.kt
T
Ilya Chernikov 6356807997 Reapply "Only create descriptors for candidates with lambda args"
#KT-36247 fixed
A lot of testdata changed because significanly less (error) descriptors
are created for unresolved types, so diagnostics became different.
2020-02-14 11:41:30 +01:00

14 lines
491 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) {
<!NI;UNRESOLVED_REFERENCE_WRONG_RECEIVER, OI;DEBUG_INFO_MISSING_UNRESOLVED, OI;FUNCTION_EXPECTED!>identifier<!>()
<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>identifier<!>(123)
<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>identifier<!>(1, 2)
1.<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>fn<!>()
}