FIR: Add ConeVisibilityError to distinguish between candidates that are

invisible versus hidden due to deprecation.
This commit is contained in:
Mark Punzalan
2021-09-23 20:29:50 +00:00
committed by TeamCityServer
parent 58eb329fb9
commit 41a1fa25e2
6 changed files with 14 additions and 3 deletions
@@ -8,6 +8,7 @@ package org.jetbrains.kotlin.resolve.calls.tower
enum class CandidateApplicability {
RESOLVED_TO_SAM_WITH_VARARG, // migration warning up to 1.5 (when resolve to function with SAM conversion and array without spread as vararg)
HIDDEN, // removed from resolve
VISIBILITY_ERROR, // problems with visibility
UNSUPPORTED, // unsupported feature
INAPPLICABLE_WRONG_RECEIVER, // receiver not matched
INAPPLICABLE_ARGUMENTS_MAPPING_ERROR, // arguments not mapped to parameters (i.e. different size of arguments and parameters)
@@ -15,7 +16,7 @@ enum class CandidateApplicability {
INAPPLICABLE_MODIFIER, // no expected modifier (eg infix call on non-infix function)
NO_COMPANION_OBJECT, // Classifier does not have a companion object
IMPOSSIBLE_TO_GENERATE, // access to outer class from nested
RUNTIME_ERROR, // problems with visibility
RUNTIME_ERROR, // TODO: FE 1.0 uses this as catch-all for all other errors. Consider re-assigning those diagnostics.
UNSAFE_CALL, // receiver or argument nullability doesn't match
UNSTABLE_SMARTCAST, // unstable smart cast
CONVENTION_ERROR, // missing infix, operator etc