[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
@@ -21,7 +21,7 @@ fun case1() {
val x : Case1? = Case1()
x.<!VAL_REASSIGNMENT!>x<!> = "0"
x?.<!VAL_REASSIGNMENT!>x<!> = "0"
<!VARIABLE_EXPECTED!>x::<!UNRESOLVED_REFERENCE!>x<!><!> = TODO()
<!VARIABLE_EXPECTED!>x::x<!> = TODO()
}
class Case1{
@@ -37,7 +37,7 @@ fun case2() {
val x : Case2? = Case2(null)
x.<!VAL_REASSIGNMENT!>x<!> = "0"
x?.<!VAL_REASSIGNMENT!>x<!> = "0"
<!VARIABLE_EXPECTED!>x::<!UNRESOLVED_REFERENCE!>x<!><!> = TODO()
<!VARIABLE_EXPECTED!>x::x<!> = TODO()
}
class Case2(val x: Any?) {}
@@ -50,7 +50,7 @@ fun case3() {
val x : Case3? = Case3()
x.<!VAL_REASSIGNMENT!>x<!> = "0"
x?.<!VAL_REASSIGNMENT!>x<!> = "0"
<!VARIABLE_EXPECTED!>x::<!UNRESOLVED_REFERENCE!>x<!><!> = TODO()
<!VARIABLE_EXPECTED!>x::x<!> = TODO()
}
class Case3() {