Skip to content

KaPartiallyAppliedSymbol

A callable symbol partially applied with receivers and type arguments. Essentially, this is a call that misses some information. For properties, the missing information is the type of access (read, write, or compound access) to this property. For functions, the missing information is the value arguments for the call.

Properties

contextArguments

The list of context parameters for this symbol access. The list is available if the callable is declared with context parameters.

dispatchReceiver

The dispatch receiver for this symbol access. A dispatch receiver is available if the callable is declared inside a class or object.

extensionReceiver

The extension receiver for this symbol access. An extension receiver is available if the callable is declared with an extension receiver.

signature

abstract val signature: C

The function or variable declaration.

symbol

The callable symbol which the KaPartiallyAppliedSymbol represents. While the information contained in a partially applied symbol is not exhaustive (e.g. applied functions are missing value arguments), the symbol of the callable which is called is definite.

token

abstract val token: KaLifetimeToken

The KaLifetimeToken which determines the lifetime of the lifetime owner.

Functions

assertIsValidAndAccessible

isValid

Whether the lifetime owner is still valid, i.e. we are still in the scope of the lifetime owner's regular lifetime.

withValidityAssertion

inline fun <R> KaLifetimeOwner.withValidityAssertion(action: () -> R): R

Executes action only if the KaLifetimeOwner is still valid and accessible. Otherwise, throws a validity exception based on the concrete violation.