[FIR] Report INAPPLICABLE_CANDIDATE or more specific diagnostic for callable references
... instead of just UNRESOLVED_REFERENCE when something went wrong during resolution. #KT-59401 related
This commit is contained in:
committed by
Space Team
parent
6b7eeec181
commit
d91000e39c
+2
-2
@@ -10,6 +10,6 @@ FILE: resolveCallableReferencesAfterAllSimpleArguments.kt
|
||||
public final fun <T> baz(e: R|T|, f: R|(T) -> kotlin/Unit|): R|kotlin/Unit| {
|
||||
}
|
||||
public final fun test(a: R|A|, b: R|B|): R|kotlin/Unit| {
|
||||
R|/baz<Inapplicable(INAPPLICABLE): /baz>#|<R|A|>(R|<local>/a|, ::<Unresolved reference: fooB>#)
|
||||
R|/bar<Inapplicable(INAPPLICABLE): /bar>#|<R|A|>(::<Unresolved reference: fooB>#, R|<local>/a|)
|
||||
R|/baz<Inapplicable(INAPPLICABLE): /baz>#|<R|A|>(R|<local>/a|, ::<Inapplicable(INAPPLICABLE): /fooB>#)
|
||||
R|/bar<Inapplicable(INAPPLICABLE): /bar>#|<R|A|>(::<Inapplicable(INAPPLICABLE): /fooB>#, R|<local>/a|)
|
||||
}
|
||||
|
||||
+2
-2
@@ -7,6 +7,6 @@ fun <T> bar(f: (T) -> Unit, e: T) {}
|
||||
fun <T> baz(e: T, f: (T) -> Unit) {}
|
||||
|
||||
fun test(a: A, b: B) {
|
||||
baz(a, ::<!UNRESOLVED_REFERENCE!>fooB<!>)
|
||||
bar(::<!UNRESOLVED_REFERENCE!>fooB<!>, a)
|
||||
baz(a, ::<!INAPPLICABLE_CANDIDATE!>fooB<!>)
|
||||
bar(::<!INAPPLICABLE_CANDIDATE!>fooB<!>, a)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user