[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
@@ -10,7 +10,7 @@ suspend fun String.id(): String = this
fun box() {
val x = "f"
builder {
go1(x::<!UNRESOLVED_REFERENCE!>id<!>)
go2(x::<!UNRESOLVED_REFERENCE!>id<!>)
go1(x::<!INAPPLICABLE_CANDIDATE!>id<!>)
go2(x::<!INAPPLICABLE_CANDIDATE!>id<!>)
}
}
@@ -14,8 +14,8 @@ suspend fun bar(x: Int) {}
fun test() {
test0(::foo)
test1(::<!UNRESOLVED_REFERENCE!>foo<!>)
test1(::<!INAPPLICABLE_CANDIDATE!>foo<!>)
test0(::<!UNRESOLVED_REFERENCE!>bar<!>)
test0(::<!INAPPLICABLE_CANDIDATE!>bar<!>)
test1(::bar)
}