Skip to content

KaScopeKind

sealed interface KaScopeKind

Inheritors

Types

DefaultSimpleImportingScope

Represents a KaScope containing declarations from non-star imports which are not declared explicitly and are added by default.

DefaultStarImportingScope

Represents a KaScope containing declarations from star imports which are not declared explicitly and are added by default.

ExplicitSimpleImportingScope

Represents a KaScope containing declarations from explicit non-star imports.

ExplicitStarImportingScope

Represents a KaScope containing declarations from explicit star imports.

ImportingScope

Represents a KaScope containing declarations from imports.

LocalScope

NonLocalScope

sealed interface NonLocalScope : KaScopeKind

PackageMemberScope

Represents a KaScope containing declarations from a package.

ScriptMemberScope

Represents a KaScope containing the members of a script.

StaticMemberScope

Represents a KaScope containing the static members of a classifier.

TypeParameterScope

Represents a KaScope containing type parameters.

TypeScope

Represents a KaScope for a type, which includes synthetic Java properties of that type.

Properties

indexInTower

abstract val indexInTower: Int

An index in the scope tower. The lower the index, the closer the scope is to the context position.

Example

fun f(a: A, b: B) {      // local scope:       indexInTower = 2
    with(a) {            // type scope for A:  indexInTower = 1
        with(b) {        // type scope for B:  indexInTower = 0
            <caret>
        }
    }
}