KT-59093 [Analysis API] Make all resolveCall overloads nullable

Instead of returning an error which does not mean anything specific,
it's easier just to return `null`
This commit is contained in:
Roman Golyshev
2023-06-20 17:06:16 +02:00
committed by teamcity
parent c81b22e7de
commit 50c93b0228
3 changed files with 5 additions and 19 deletions
@@ -16,7 +16,7 @@ import org.jetbrains.kotlin.psi.KtExpression
class KtFirInvokeFunctionReference(expression: KtCallExpression) : KtInvokeFunctionReference(expression), KtFirReference {
override fun KtAnalysisSession.resolveToSymbols(): Collection<KtSymbol> {
return expression.resolveCall().calls.mapNotNull { call ->
return expression.resolveCall()?.calls.orEmpty().mapNotNull { call ->
(call as? KtSimpleFunctionCall)
?.takeIf { it.isImplicitInvoke }
?.partiallyAppliedSymbol