Improve diagnostic for unresolved reference when function expected

#KT-10657 Fixed
This commit is contained in:
Mikhail Zarechenskiy
2017-07-02 23:48:13 +03:00
parent 0ae45a2835
commit 3fed4e6dc7
6 changed files with 106 additions and 2 deletions
@@ -0,0 +1,12 @@
// !DIAGNOSTICS: -UNUSED_PARAMETER
fun Int.invoke() {}
class SomeClass
fun test(identifier: SomeClass, fn: String.() -> Unit) {
<!FUNCTION_EXPECTED, DEBUG_INFO_MISSING_UNRESOLVED!>identifier<!>()
<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>identifier<!>(123)
<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>identifier<!>(1, 2)
1.<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>fn<!>()
}