[FIR] Additional errors to distinguish resolution to classifier cases

When a call is resolved to a classifier, only a single error message was
being used for multiple cases. This lead to confusion as the default
message may not be applicable to a given error case. Added additional
errors and messages to distinguish between these error cases.

#KT-57251 Fixed
This commit is contained in:
Brian Norman
2023-06-02 09:34:49 -05:00
committed by Space Team
parent ac79633590
commit 0ff9982b31
44 changed files with 582 additions and 39 deletions
@@ -0,0 +1,6 @@
interface MutableMatrix<T> {
}
fun <T> toMutableMatrix(): MutableMatrix<T> {
return <!INTERFACE_AS_FUNCTION!>MutableMatrix<!><T>()
}
@@ -1,7 +1,6 @@
// FIR_IDENTICAL
interface MutableMatrix<T> {
}
fun <T> toMutableMatrix(): MutableMatrix<T> {
return <!RESOLUTION_TO_CLASSIFIER!>MutableMatrix<!><T>()
}
}
@@ -6,7 +6,7 @@ object B
class C
fun test() {
val interface_as_fun = <!RESOLUTION_TO_CLASSIFIER!>A<!>()
val interface_as_fun = <!INTERFACE_AS_FUNCTION!>A<!>()
val interface_as_val = <!NO_COMPANION_OBJECT!>A<!>
val object_as_fun = <!UNRESOLVED_REFERENCE!>B<!>()
@@ -8,7 +8,7 @@ object X {
}
fun testX() {
val interface_as_fun = X.<!RESOLUTION_TO_CLASSIFIER!>A<!>()
val interface_as_fun = X.<!INTERFACE_AS_FUNCTION!>A<!>()
val interface_as_val = X.<!NO_COMPANION_OBJECT!>A<!>
val object_as_fun = X.<!UNRESOLVED_REFERENCE!>B<!>()
@@ -23,7 +23,7 @@ class Y {
}
fun testY() {
val interface_as_fun = Y.<!RESOLUTION_TO_CLASSIFIER!>A<!>()
val interface_as_fun = Y.<!INTERFACE_AS_FUNCTION!>A<!>()
val interface_as_val = Y.<!NO_COMPANION_OBJECT!>A<!>
val object_as_fun = Y.<!UNRESOLVED_REFERENCE!>B<!>()