Skip to content

KaContextSensitiveResolutionStatus

Describes how context-sensitive resolution (CSR) relates to a org.jetbrains.kotlin.psi.KtSimpleNameExpression.

It tells both whether the name is already resolved through CSR and whether CSR could be used to drop an otherwise redundant qualifier or import. IDE inspections and shorteners can use this information to suggest removing such qualifiers and imports.

The information is available even when the -Xcontext-sensitive-resolution feature is not enabled.

The status of a particular name is obtained via the contextSensitiveResolutionStatus property declared in KaResolver.

Inheritors

Types

ImportCanBeRemoved

The name is resolved through an import which can be removed: context-sensitive resolution would resolve the same symbol without it.

NotAvailable

Context-sensitive resolution is neither used by, nor applicable to, the name.

QualifierCanBeRemoved

The name is resolved through an explicit qualifier which can be removed: context-sensitive resolution would resolve the same symbol without it.

Used

The name is already resolved through context-sensitive resolution.