KaCallInfo
KaCallInfo is the sealed result of KtElement.resolveToCall(): KaCallInfo? — the legacy entry point on any KtElement. The call may have either resolved successfully (KaSuccessCallInfo) or failed (KaErrorCallInfo, carrying candidate calls and a diagnostic).
Hierarchy
Members
KaSuccessCallInfo
val call: KaCallThe successfully resolved call.
KaErrorCallInfo
val candidateCalls: List<KaCall>The candidates considered during resolution that were not selected. May be empty — an error call is not guaranteed to have candidates.
val diagnostic: KaDiagnosticThe diagnostic describing the error.
Helper extensions
val KaCallInfo.calls: List<KaCall>The list of calls. A one-element list for
KaSuccessCallInfo; thecandidateCallsforKaErrorCallInfo.inline fun <reified T : KaCall> KaCallInfo.singleCallOrNull(): T?The single
KaCallof typeTfrom the list, ornullif no such single call exists. For an error call, returns a single candidate of typeT.fun KaCallInfo.singleFunctionCallOrNull(): KaFunctionCall<*>?
fun KaCallInfo.singleVariableAccessCall(): KaVariableAccessCall?
fun KaCallInfo.singleConstructorCallOrNull(): KaFunctionCall<KaConstructorSymbol>?Specialized variants of
singleCallOrNullfor the common cases.inline fun <reified T : KaCall> KaCallInfo.successfulCallOrNull(): T?The successful call of type
T, ornullif the call is not successful or is of a different type.fun KaCallInfo.successfulFunctionCallOrNull(): KaFunctionCall<*>?
fun KaCallInfo.successfulVariableAccessCall(): KaVariableAccessCall?
fun KaCallInfo.successfulConstructorCallOrNull(): KaFunctionCall<KaConstructorSymbol>?Specialized variants of
successfulCallOrNullfor the common cases.
Replacement mapping
| New equivalent |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|