[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
+1
-1
@@ -21,5 +21,5 @@ fun main() {
|
||||
// Here, the error should be
|
||||
val x2: (Int) -> Unit = takeSuspend(<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.coroutines.SuspendFunction1<kotlin.Int, kotlin.Unit> & kotlin.Function1<kotlin.Int, kotlin.Unit>")!>id { <!UNRESOLVED_REFERENCE!>it<!> }<!>, <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Function1<kotlin.Nothing, kotlin.Nothing>")!>{ x -> x }<!>)
|
||||
val x3: suspend (Int) -> Unit = takeSimpleFunction(<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Function1<kotlin.Int, kotlin.Unit> & kotlin.coroutines.SuspendFunction1<kotlin.Int, kotlin.Unit>")!>id { <!UNRESOLVED_REFERENCE!>it<!> }<!>, <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Function1<kotlin.Nothing, kotlin.Nothing>")!>{ x -> x }<!>)
|
||||
val x4: (Int) -> Unit = <!INAPPLICABLE_CANDIDATE!>takeSimpleFunction<!>(id<suspend (Int) -> Unit> {}, <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Function0<kotlin.Unit>")!>{}<!>)
|
||||
val x4: (Int) -> Unit = <!INAPPLICABLE_CANDIDATE!>takeSimpleFunction<!>(id<suspend (Int) -> Unit> {}, <!DEBUG_INFO_EXPRESSION_TYPE("Type is unknown")!>{}<!>)
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// !WITH_NEW_INFERENCE
|
||||
// NI_EXPECTED_FILE
|
||||
|
||||
fun foo(first: Array<Any?>, second: Array<Any?>) = <!INAPPLICABLE_CANDIDATE!>Pair<!>(first.<!INAPPLICABLE_CANDIDATE!>toCollection<!>(), second.<!INAPPLICABLE_CANDIDATE!>toCollection<!>())
|
||||
fun foo(first: Array<Any?>, second: Array<Any?>) = Pair(first.<!INAPPLICABLE_CANDIDATE!>toCollection<!>(), second.<!INAPPLICABLE_CANDIDATE!>toCollection<!>())
|
||||
|
||||
@@ -20,7 +20,7 @@ fun testArrays(ci: List<Int?>, cii: List<Int?>?) {
|
||||
|
||||
checkSubtype<Array<Int?>>(c1)
|
||||
checkSubtype<Array<Int?>>(c2)
|
||||
<!INAPPLICABLE_CANDIDATE!>checkSubtype<!><Array<Int?>>(c3)
|
||||
checkSubtype<Array<Int?>>(c3)
|
||||
checkSubtype<Array<Int?>>(c4)
|
||||
<!INAPPLICABLE_CANDIDATE!>checkSubtype<!><Array<Int?>>(c5)
|
||||
checkSubtype<Array<Int?>>(c5)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user