Skip to content

KaSuccessCallInfo

A successfully resolved call.

Properties

call

abstract val call: KaCall

The successfully resolved KaCall.

calls

The list of KaCalls associated with the KaCallInfo. The list contains a single KaCall in case of a successful call, but may contain multiple candidates in case of an error call.

The flattened list of resolved calls.

The flattened list of KaSimpleCalls.

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.

singleCallOrNull

inline fun <reified T : KaCall> KaCallInfo.singleCallOrNull(): T?

Returns the single KaCall of type T associated with the KaCallInfo, or null if there is no such exact single call.

In the case of an error call, returns a single candidate call of type T.

singleConstructorCallOrNull

Returns the single KaFunctionCall with a KaConstructorSymbol associated with the KaCallInfo, or null if there is no such exact single call.

See also

singleFunctionCallOrNull

Returns the single KaFunctionCall associated with the KaCallInfo, or null if there is no such exact single call.

See also

singleVariableAccessCall

Returns the single KaVariableAccessCall associated with the KaCallInfo, or null if there is no such exact single call.

See also

successfulCallOrNull

inline fun <reified T : KaCall> KaCallInfo.successfulCallOrNull(): T?

Returns the successful KaCall of type T associated with the KaCallInfo, or null if there is no such exact call (either the call is not successful, or the successful call is of another type).

successfulConstructorCallOrNull

Returns the successful KaFunctionCall with a KaConstructorSymbol associated with the KaCallInfo, or null if there is no such exact call.

See also

successfulFunctionCallOrNull

Returns the successful KaFunctionCall associated with the KaCallInfo, or null if there is no such exact call.

See also

successfulVariableAccessCall

Returns the successful KaVariableAccessCall associated with the KaCallInfo, or null if there is no such exact call.

See also

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.