From 588b1354f60c3057f6886f19b8f5d235926d867c Mon Sep 17 00:00:00 2001 From: Mikhail Glukhikh Date: Thu, 18 Feb 2021 16:03:34 +0300 Subject: [PATCH] FIR IDE: fix reference shortening regarding new qualified sources --- .../frontend/api/fir/components/KtFirReferenceShortener.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/idea/idea-frontend-fir/src/org/jetbrains/kotlin/idea/frontend/api/fir/components/KtFirReferenceShortener.kt b/idea/idea-frontend-fir/src/org/jetbrains/kotlin/idea/frontend/api/fir/components/KtFirReferenceShortener.kt index 41dff03299d..0653e64c602 100644 --- a/idea/idea-frontend-fir/src/org/jetbrains/kotlin/idea/frontend/api/fir/components/KtFirReferenceShortener.kt +++ b/idea/idea-frontend-fir/src/org/jetbrains/kotlin/idea/frontend/api/fir/components/KtFirReferenceShortener.kt @@ -326,8 +326,8 @@ private class ElementsToShortenCollector(private val shorteningContext: FirShort private fun processFunctionCall(functionCall: FirFunctionCall) { if (!canBePossibleToDropReceiver(functionCall)) return - val callExpression = functionCall.psi as? KtCallExpression ?: return - val qualifiedCallExpression = callExpression.getDotQualifiedExpressionForSelector() ?: return + val qualifiedCallExpression = functionCall.psi as? KtDotQualifiedExpression ?: return + val callExpression = qualifiedCallExpression.selectorExpression as? KtCallExpression ?: return val calleeReference = functionCall.calleeReference val callableId = findUnambiguousReferencedCallableId(calleeReference) ?: return