From 9330018390162e6da59e90366b68655918771131 Mon Sep 17 00:00:00 2001 From: Roman Efremov Date: Fri, 18 Nov 2022 16:02:23 +0300 Subject: [PATCH] Add comment with reference to K2 implementation of opt-in check ^KTIJ-23369 Fixed --- .../jetbrains/kotlin/resolve/checkers/OptInUsageChecker.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/compiler/frontend/src/org/jetbrains/kotlin/resolve/checkers/OptInUsageChecker.kt b/compiler/frontend/src/org/jetbrains/kotlin/resolve/checkers/OptInUsageChecker.kt index 318629c5462..87762264c2f 100644 --- a/compiler/frontend/src/org/jetbrains/kotlin/resolve/checkers/OptInUsageChecker.kt +++ b/compiler/frontend/src/org/jetbrains/kotlin/resolve/checkers/OptInUsageChecker.kt @@ -315,7 +315,10 @@ class OptInUsageChecker(project: Project) : CallChecker { /** * Checks whether there's an element lexically above in the tree, annotated with `@OptIn(X::class)`, or a declaration - * annotated with `@X` where [annotationFqName] is the FQ name of X + * annotated with `@X` where [annotationFqName] is the FQ name of X. + * + * This implementation also was rewritten for K2 use in intellij repository. + * See `org.jetbrains.kotlin.idea.base.fir.codeInsight.FirOptInUsageCheckerKt#isOptInAllowed`. */ fun PsiElement.isOptInAllowed( annotationFqName: FqName,