You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[AA] KT-74867 Move filtering local declarations from KotlinAnnotationsResolver into LLFirIdePredicateBasedProvider
The problem described in the KT-74867
is caused by the fact that the IDE
implementation of `KotlinAnnotationsResolver`
(see `IdeKotlinAnnotationsResolver`) does not
filter local classes by itself.
Since `LookupPredicate`s should never match
local declarations, this resulted in exceptions in the IDE
from lazy resolution because resolving local declarations
requires resolving bodies,
and that's too early for compiler plugins.
It seems like moving this logic for filtering local declarations
from the `KotlinAnnotationsResolver` implementations
into the `LLFirIdePredicateBasedProvider` is more consistent,
because this class interacts directly with `LookupPredicate`
and should obey the contract.
^KT-74867 Fixed
Copy file name to clipboardExpand all lines: analysis/analysis-api-standalone/analysis-api-standalone-base/src/org/jetbrains/kotlin/analysis/api/standalone/base/declarations/KotlinStandaloneAnnotationsResolver.kt
+2-11Lines changed: 2 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -38,17 +38,8 @@ private class KotlinStandaloneAnnotationsResolver(
38
38
privateval allDeclarations:List<KtDeclaration> by lazy {
Copy file name to clipboardExpand all lines: analysis/low-level-api-fir/src/org/jetbrains/kotlin/analysis/low/level/api/fir/providers/LLFirIdePredicateBasedProvider.kt
+5-2Lines changed: 5 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -60,13 +60,13 @@ internal class LLFirIdePredicateBasedProvider(
0 commit comments