From 4a0eba89cbf21a77342e07f0d3d5f092903b4205 Mon Sep 17 00:00:00 2001 From: Roman Golyshev Date: Wed, 9 Apr 2025 12:36:56 +0200 Subject: [PATCH] KTIJ-33579 [kotlin] Add extra documentation to `ImportContext.isExplicitReceiver` GitOrigin-RevId: aa8acc7575310b81def45467d9f3f60c6ec2473d --- .../idea/k2/codeinsight/fixes/imprt/ImportContext.kt | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/plugins/kotlin/code-insight/fixes-k2/src/org/jetbrains/kotlin/idea/k2/codeinsight/fixes/imprt/ImportContext.kt b/plugins/kotlin/code-insight/fixes-k2/src/org/jetbrains/kotlin/idea/k2/codeinsight/fixes/imprt/ImportContext.kt index 974f2aeab4fa..c915f1e4196c 100644 --- a/plugins/kotlin/code-insight/fixes-k2/src/org/jetbrains/kotlin/idea/k2/codeinsight/fixes/imprt/ImportContext.kt +++ b/plugins/kotlin/code-insight/fixes-k2/src/org/jetbrains/kotlin/idea/k2/codeinsight/fixes/imprt/ImportContext.kt @@ -13,6 +13,16 @@ import org.jetbrains.kotlin.psi.KtExpression internal interface ImportContext { val position: KtElement val positionType: ImportPositionType + + /** + * Indicates whether the receiver of a call is explicitly applied in the position + * represented by this import context. + * + * Note: If [isExplicitReceiver] is `true`, it does not mean that there + * is an explicit PSI expression which can be considered a receiver. + * It just means that the type of explicit receiver cannot be ignored + * when applying auto-import candidates. + */ val isExplicitReceiver: Boolean context(KaSession)