KaErrorCallInfo¶
@SubclassOptInRequired(markerClass = [KaImplementationDetail::class])
interface KaErrorCallInfo : KaCallInfo
An erroneous call. The candidateCalls and diagnostic can be used to further analyze the error.
Properties¶
calls¶
val KaCallInfo.calls: List<KaCall>
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.
-
KaSimpleCallResolutionSuccess: the resolvedcallas a single-element list. -
KaMultiCallResolutionAttempt: the assembledcallif all sub-calls succeeded, or the combined calls from individualsimpleAttemptsotherwise.
val KaSimpleOrMultiCall.calls: List<KaSimpleCall<*, *>>
The flattened list of KaSimpleCalls.
-
If
thisis an instance ofKaSimpleCall, the list will contain onlythiscall -
If
thisis an instance ofKaMultiCall, the list will containKaMultiCall.calls
candidateCalls¶
abstract val candidateCalls: List<KaCall>
A list of KaCalls to candidates that were considered during the call resolution process, but ultimately not selected. This may be due to various errors. For example, an ambiguity results in an error call with multiple candidates.
An error call is not guaranteed to have any candidates.
diagnostic¶
abstract val diagnostic: KaDiagnostic
The KaDiagnostic describing the error.
token¶
abstract val token: KaLifetimeToken
The KaLifetimeToken which determines the lifetime of the lifetime owner.
Functions¶
assertIsValidAndAccessible¶
inline fun KaLifetimeOwner.assertIsValidAndAccessible()
isValid¶
fun KaLifetimeOwner.isValid(): Boolean
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¶
fun KaCallInfo.singleFunctionCallOrNull(): KaFunctionCall<*>?
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¶
fun KaCallInfo.successfulFunctionCallOrNull(): KaFunctionCall<*>?
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.