[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
@@ -8,7 +8,7 @@ public class A<E> {
// FILE: main.kt
fun test(x: List<Int>, y: List<String>) {
A("", x) checkType { <!INAPPLICABLE_CANDIDATE!>_<!><A<Any?>>() }
A("", x) checkType { <!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>_<!><A<Any?>>() }
A("", y) checkType { _<A<String?>>() }
A<CharSequence, String>("", <!ARGUMENT_TYPE_MISMATCH!>x<!>)
@@ -12,6 +12,6 @@ fun test(x: List<Int>, y: List<String>) {
Outer<Int>().Inner("", y, 1) checkType { _<Outer<Int>.Inner<String>>() }
Outer<Int>().Inner<CharSequence, String, Int>("", y, 1) checkType { _<Outer<Int>.Inner<CharSequence>>() }
Outer<Int>().Inner("", x, 1) checkType { <!INAPPLICABLE_CANDIDATE!>_<!><Outer<Int>.Inner<Any>>() }
Outer<Int>().Inner("", x, 1) checkType { <!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>_<!><Outer<Int>.Inner<Any>>() }
Outer<Int>().Inner<CharSequence, String, Int>("", <!ARGUMENT_TYPE_MISMATCH!>x<!>, 1)
}