[FIR] Report NONE_APPLICABLE on callable references with multiple failed candidates
This commit is contained in:
committed by
Space Team
parent
6d2ab92d91
commit
d54068b8ab
Vendored
+4
-4
@@ -4,9 +4,9 @@ fun test() {
|
||||
val a1: Array<Double.(Double) -> Double> = arrayOf(Double::plus, Double::minus)
|
||||
val a2: Array<Double.(Int) -> Double> = arrayOf(Double::plus, Double::minus)
|
||||
|
||||
val a3: Array<Int.(Int) -> Double> = arrayOf(Double::<!UNRESOLVED_REFERENCE!>plus<!>, Double::<!UNRESOLVED_REFERENCE!>minus<!>)
|
||||
val a4: Array<Int.(Double) -> Double> = arrayOf(Int::plus, Double::<!UNRESOLVED_REFERENCE!>minus<!>)
|
||||
val a5: Array<Double.(Double) -> Double> = arrayOf(Double::plus, Int::<!UNRESOLVED_REFERENCE!>minus<!>)
|
||||
val a3: Array<Int.(Int) -> Double> = arrayOf(Double::<!NONE_APPLICABLE!>plus<!>, Double::<!NONE_APPLICABLE!>minus<!>)
|
||||
val a4: Array<Int.(Double) -> Double> = arrayOf(Int::plus, Double::<!NONE_APPLICABLE!>minus<!>)
|
||||
val a5: Array<Double.(Double) -> Double> = arrayOf(Double::plus, Int::<!NONE_APPLICABLE!>minus<!>)
|
||||
}
|
||||
|
||||
fun foo(x: Int) {}
|
||||
@@ -17,5 +17,5 @@ fun <T> bar(x: T, f: (T) -> Unit) {}
|
||||
fun test2() {
|
||||
bar(1, ::foo)
|
||||
bar("", ::foo)
|
||||
bar(1.0, ::<!UNRESOLVED_REFERENCE!>foo<!>)
|
||||
bar(1.0, ::<!NONE_APPLICABLE!>foo<!>)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user