[FIR] Implement UNRESOLVED_REFERENCE_WRONG_RECEIVER
This commit is contained in:
+1
-1
@@ -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<!>)
|
||||
|
||||
+1
-1
@@ -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)
|
||||
}
|
||||
|
||||
+4
-4
@@ -20,9 +20,9 @@ public abstract class CollectionWithSize implements java.util.Collection<String>
|
||||
// FILE: main.kt
|
||||
|
||||
fun main(c: CollectionWithSize) {
|
||||
CompressionType.ZIP.<!OVERLOAD_RESOLUTION_AMBIGUITY!>name<!> <!INAPPLICABLE_CANDIDATE!>checkType<!> { _<Double>() }
|
||||
c.<!OVERLOAD_RESOLUTION_AMBIGUITY!>size<!> <!INAPPLICABLE_CANDIDATE!>checkType<!> { _<String>() }
|
||||
CompressionType.ZIP.<!OVERLOAD_RESOLUTION_AMBIGUITY!>name<!> <!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>checkType<!> { _<Double>() }
|
||||
c.<!OVERLOAD_RESOLUTION_AMBIGUITY!>size<!> <!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>checkType<!> { _<String>() }
|
||||
|
||||
CompressionType.ZIP::<!OVERLOAD_RESOLUTION_AMBIGUITY!>name<!> <!INAPPLICABLE_CANDIDATE!>checkType<!> { _<kotlin.reflect.KProperty0<Double>>() }
|
||||
c::<!OVERLOAD_RESOLUTION_AMBIGUITY!>size<!> <!INAPPLICABLE_CANDIDATE!>checkType<!> { _<kotlin.reflect.KProperty0<String>>() }
|
||||
CompressionType.ZIP::<!OVERLOAD_RESOLUTION_AMBIGUITY!>name<!> <!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>checkType<!> { _<kotlin.reflect.KProperty0<Double>>() }
|
||||
c::<!OVERLOAD_RESOLUTION_AMBIGUITY!>size<!> <!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>checkType<!> { _<kotlin.reflect.KProperty0<String>>() }
|
||||
}
|
||||
|
||||
@@ -11,6 +11,6 @@ public class A {
|
||||
// FILE: main.kt
|
||||
|
||||
fun foo(a: A) {
|
||||
a.<!OVERLOAD_RESOLUTION_AMBIGUITY!>foo<!>() <!INAPPLICABLE_CANDIDATE!>checkType<!> { _<String>() }
|
||||
A.<!OVERLOAD_RESOLUTION_AMBIGUITY!>bar<!>() <!INAPPLICABLE_CANDIDATE!>checkType<!> { _<String>() }
|
||||
a.<!OVERLOAD_RESOLUTION_AMBIGUITY!>foo<!>() <!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>checkType<!> { _<String>() }
|
||||
A.<!OVERLOAD_RESOLUTION_AMBIGUITY!>bar<!>() <!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>checkType<!> { _<String>() }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user