KaMultiCall
KaMultiCall represents a compound or desugared expression that resolves to multiple sub-calls. It is one branch of KaSingleOrMultiCall; the other branch, KaSingleCall, describes a single resolved callable.
A KaMultiCall is returned for the four desugared constructs Kotlin lowers into several operator calls:
forloops → KaForLoopCall (iterator(),hasNext(),next()).by-delegated properties → KaDelegatedPropertyCall (getValue(), optionallysetValue(), optionallyprovideDelegate()).Compound variable assignment and unary increment/decrement (
i += 1,i++,i--) → KaCompoundVariableAccessCall (the variable access plus the operator).Compound array access (
a[i] += v) → KaCompoundArrayAccessCall (get(),set(), plus the operator).
Hierarchy
Members
val calls: List<KaSingleCall<*, *>>The non-empty list of KaSingleCall s discovered during resolution — the flat view of every sub-call.
Each concrete subtype additionally exposes named sub-call accessors that describe each sub-call's role (iteratorCall, valueGetterCall, getterCall, setterCall, operationCall, and so on). See the individual subtype pages for the full list.
Working with attempts
When you need to know which sub-calls resolved and which did not, use tryResolveCall() on the originating PSI element. The resulting KaCallResolutionAttempt is a KaMultiCallResolutionAttempt (or one of its concrete subtypes) and exposes each sub-call attempt independently. The assembled KaMultiCall is only available when every sub-attempt succeeded.