[FIR] Report INAPPLICABLE_CANDIDATE or more specific diagnostic for callable references

... instead of just UNRESOLVED_REFERENCE when something went wrong
during resolution.

#KT-59401 related
This commit is contained in:
Kirill Rakhman
2023-11-03 13:39:27 +01:00
committed by Space Team
parent 6b7eeec181
commit d91000e39c
44 changed files with 80 additions and 78 deletions
@@ -9,7 +9,7 @@ class Foo<out T>(name: T) {
val ok2 = this@Foo::prop
val ok3 = object { val y: Any = this@Foo::prop }
val fail1 = Foo(prop)::<!UNRESOLVED_REFERENCE!>prop<!>
val fail1 = Foo(prop)::<!INVISIBLE_REFERENCE!>prop<!>
}
fun testFunc() {
@@ -17,7 +17,7 @@ class Foo<out T>(name: T) {
val ok2 = this@Foo::func
val ok3 = object { val y: Any = this@Foo::func }
val fail1 = Foo(prop)::<!UNRESOLVED_REFERENCE!>func<!>
val fail1 = Foo(prop)::<!INVISIBLE_REFERENCE!>func<!>
}
private fun func(t: T): T = t