[FIR] Improve diagnostic reporting & don't use error symbol for candidate if possible
Also introduce few new diagnostics: - NONE_APPLICABLE more many inapplicable candidates - HIDDEN for visible candidates
This commit is contained in:
committed by
Mikhail Glukhikh
parent
5c0528b61e
commit
f283f2db43
-19
@@ -1,19 +0,0 @@
|
||||
// !WITH_NEW_INFERENCE
|
||||
// !CHECK_TYPE
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
|
||||
import kotlin.reflect.*
|
||||
|
||||
interface A
|
||||
interface B : A
|
||||
|
||||
fun A.foo() {}
|
||||
|
||||
fun take(f: (A) -> Unit) {}
|
||||
fun take(f: () -> Unit) {}
|
||||
|
||||
fun test() {
|
||||
B::foo checkType { _<KFunction1<B, Unit>>() }
|
||||
|
||||
<!INAPPLICABLE_CANDIDATE!>take<!>(B::foo)
|
||||
}
|
||||
+1
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
// !WITH_NEW_INFERENCE
|
||||
// !CHECK_TYPE
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
|
||||
Vendored
+2
-2
@@ -25,7 +25,7 @@ class A {
|
||||
|
||||
expectFunction0Unit(::foo)
|
||||
expectFunction0String(::foo)
|
||||
<!INAPPLICABLE_CANDIDATE!>expectFunction1Unit<!>(::foo)
|
||||
<!INAPPLICABLE_CANDIDATE!>expectFunction1String<!>(::foo)
|
||||
<!INAPPLICABLE_CANDIDATE!>expectFunction1Unit<!>(<!UNRESOLVED_REFERENCE!>::foo<!>)
|
||||
<!INAPPLICABLE_CANDIDATE!>expectFunction1String<!>(<!UNRESOLVED_REFERENCE!>::foo<!>)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user