Overview¶
The Analysis API answers two independent questions about resolvable Kotlin PSI:
- What declaration does this PSI element refer to? — the symbol the element literally points to. Read Resolving Symbols.
- How is this expression executed at this site? — the callable selected at the call site, with receivers, type arguments, and value arguments. Read Resolving Calls.
Resolution Fundamentals introduces both views together, the KtResolvable / KtResolvableCall marker
interfaces, and the difference between the "plain" (resolveSuccessfulSymbol / resolveSuccessfulCall) and "try"
(tryResolveSymbols / tryResolveCall) forms.
If you need every overload the compiler considered at a call site — including ones it rejected — see Resolution Candidates.
If you are upgrading code that uses the older KtReference.mainReference.resolveTo...() /
KtElement.resolveToCall(): KaCallInfo? API, see Migrating from the Legacy Resolution API.
Warning
The resolution API is annotated @KaExperimentalApi and may change between versions until it
stabilizes. Every entry point requires @OptIn(KaExperimentalApi::class).