KaImplicitInvokeCall
KaImplicitInvokeCall represents an implicit invoke operator call — a call on a value whose type has an invoke member function.
interface Foo {
operator fun <T> invoke(t: T)
}
fun test(f: Foo) {
f("str")
// ^^^^^^^^
}
f("str") is the implicit form of f.invoke("str") and resolves to a KaImplicitInvokeCall.
Hierarchy
Inherits KaFunctionCall (KaImplicitInvokeCall : KaFunctionCall<KaNamedFunctionSymbol>).
Detecting an implicit invoke
KaImplicitInvokeCall does not add new members beyond KaFunctionCall. The intended use is a type check:
val call: KaFunctionCall<*>? = callElement.resolveCall()
if (call is KaImplicitInvokeCall) {
handleImplicitInvoke(call)
}
This replaces the deprecated KaSimpleFunctionCall.isImplicitInvoke boolean from the legacy API.
19 May 2026