[FIR] Run checkers for FirErrorResolvedQualifier

`INVISIBLE_REFERENCE` may be reported due to CandidateApplicability via
a ConeDiagnostic, or in a checker. The former leads to
`FirErrorResolvedQualifier`, so the checker is not called.

This makes little sense, because CandidateApplicability may result in
`NO_COMPANION_OBJECT`, which would prevent other more meaningful
diagnostics from being reported (like `API_NOT_AVAILABLE`).

If we run checkers for `FirErrorResolvedQualifier` we may get duplicate
`INVISIBLE_REFERENCE`. The change in the checker prevents it.
This commit is contained in:
Nikolay Lunyak
2023-01-18 20:40:40 +02:00
committed by Space Team
parent 9be819087a
commit e187c9272d
6 changed files with 19 additions and 10 deletions
@@ -8,5 +8,5 @@ class IllegalVersion()
@<!INVISIBLE_REFERENCE, INVISIBLE_REFERENCE!>RequireKotlin<!>("1.2")
class LegalMinimum()
@<!INVISIBLE_REFERENCE, INVISIBLE_REFERENCE!>RequireKotlin<!>("1.2", versionKind = <!NO_COMPANION_OBJECT!>RequireKotlinVersionKind<!>.<!INVISIBLE_REFERENCE!>COMPILER_VERSION<!>, message = "Requires newer compiler version to be inlined correctly.")
@<!INVISIBLE_REFERENCE, INVISIBLE_REFERENCE!>RequireKotlin<!>("1.2", versionKind = <!INVISIBLE_REFERENCE, NO_COMPANION_OBJECT!>RequireKotlinVersionKind<!>.<!INVISIBLE_REFERENCE!>COMPILER_VERSION<!>, message = "Requires newer compiler version to be inlined correctly.")
class LegalStdLib()