[FIR] Implement UNRESOLVED_REFERENCE_WRONG_RECEIVER

This commit is contained in:
Ivan Kochurkin
2021-08-10 16:40:51 +03:00
committed by Space
parent 34cc7e5199
commit 84c5f58cab
129 changed files with 322 additions and 481 deletions
@@ -21,10 +21,10 @@ import kotlin.reflect.KProperty0
import kotlin.reflect.KProperty1
fun case() {
(V)::a checkType { <!INAPPLICABLE_CANDIDATE!>_<!><KProperty0<Int>>() }
(V)::a checkType { <!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>_<!><KProperty0<Int>>() }
(V)::a checkType { _<KProperty1<V, String>>() }
(test.abc.V)::a checkType { <!INAPPLICABLE_CANDIDATE!>_<!><KProperty0<Int>>() }
(test.abc.V)::a checkType { <!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>_<!><KProperty0<Int>>() }
(test.abc.V)::a checkType { _<KProperty1<V, String>>() }
V::a checkType { _<KProperty1<V, String>>() }
@@ -15,7 +15,7 @@ fun test1() {
bar("", 1, ::foo).checkType { _<Pair<String, Int>>() }
bar("", 1, ::fooReturnInt).checkType { _<Pair<String, Int>>() }
bar("", 1, ::fooTakeString).checkType { _<Pair<String, Int>>() }
bar("", "", ::fooReturnInt).checkType { <!INAPPLICABLE_CANDIDATE!>_<!><Pair<String, Any>>() }
bar("", "", ::fooReturnInt).checkType { <!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>_<!><Pair<String, Any>>() }
val x: String = <!INITIALIZER_TYPE_MISMATCH, TYPE_MISMATCH!>bar("", "", ::fooReturnInt)<!>
@@ -10,6 +10,6 @@ fun A.foo() = ""
class A {
fun main() {
<!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>bar<!>(::<!OVERLOAD_RESOLUTION_AMBIGUITY!>foo<!>) <!INAPPLICABLE_CANDIDATE!>checkType<!> { _<String>() }
<!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>bar<!>(::<!OVERLOAD_RESOLUTION_AMBIGUITY!>foo<!>) <!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>checkType<!> { _<String>() }
}
}