From 35ea0f86c655a472fa35fe1f36ea7b33c3324c56 Mon Sep 17 00:00:00 2001 From: Frederik Haselmeier Date: Mon, 10 Nov 2025 17:14:50 +0100 Subject: [PATCH] [kotlin] KTIJ-36297 clarified comment GitOrigin-RevId: 47965b0321008ebc51502c436860bb4dfbfe59ab --- .../AbstractCompletionDummyIdentifierProviderService.kt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plugins/kotlin/completion/impl-shared/src/org/jetbrains/kotlin/idea/completion/implCommon/AbstractCompletionDummyIdentifierProviderService.kt b/plugins/kotlin/completion/impl-shared/src/org/jetbrains/kotlin/idea/completion/implCommon/AbstractCompletionDummyIdentifierProviderService.kt index 4a7d77d82db1..f05040bf5b91 100644 --- a/plugins/kotlin/completion/impl-shared/src/org/jetbrains/kotlin/idea/completion/implCommon/AbstractCompletionDummyIdentifierProviderService.kt +++ b/plugins/kotlin/completion/impl-shared/src/org/jetbrains/kotlin/idea/completion/implCommon/AbstractCompletionDummyIdentifierProviderService.kt @@ -207,8 +207,9 @@ abstract class AbstractCompletionDummyIdentifierProviderService : CompletionDumm private fun specialExtensionReceiverDummyIdentifierSuffix(tokenBefore: PsiElement): String? { if (tokenBefore.parentOfType() != null) return null // already parsed as type reference - // If we just type `val a: `, then there is no `KtTypeReference` in the PSI tree, - // but we do not want to capture these cases here. + // If we just type `val a: `, then there is no `KtTypeReference` in the PSI tree. + // These cases work correctly without the special treatment of this function and would break when adding `.f`. + // See: KTIJ-36297 val potentialColonBefore = tokenBefore.getPrevSiblingIgnoringWhitespaceAndComments() if (potentialColonBefore.elementType == KtTokens.COLON) return null