KaCallableReferenceCall
KaCallableReferenceCall<S, C> represents a resolved callable reference to a function, property, or constructor.
A callable reference does not actually invoke the callable, so the result is leaner than other call types — no value-argument mapping, no read/write access kind. Only the signature, bound receivers, and type-argument mapping.
KaCallableReferenceCall is the cleanest example of the new resolution shape. Unlike most other call types, it extends KaSingleCall only — there is no legacy KaCallableMemberCall ancestor on this interface.
Hierarchy
Inherits KaSingleCall.
Members
KaCallableReferenceCall does not add new members beyond KaSingleCall. The relevant accessors are:
val signature: CThe substituted signature of the referenced callable.
val symbol: SHelper extension — the referenced callable symbol.
val dispatchReceiver: KaReceiverValue?The bound dispatch receiver, if any (e.g.
A()::foo).val extensionReceiver: KaReceiverValue?The bound extension receiver, if any.
val contextArguments: List<KaReceiverValue>The bound context arguments, if any.
val typeArgumentsMapping: Map<KaTypeParameterSymbol, KaType>The type arguments of the reference.
When to use it
KtCallableReferenceExpression.resolveCall() returns KaCallableReferenceCall<*, *>? directly. If you only need the referenced declaration, KtCallableReferenceExpression.resolveSymbol() returns KaCallableSymbol? — the shorter path.