[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:
Dmitriy Novozhilov
2020-07-22 16:40:14 +03:00
committed by Mikhail Glukhikh
parent 5c0528b61e
commit f283f2db43
365 changed files with 1400 additions and 1451 deletions
@@ -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")!>{}<!>)
}