Skip to content

Commit e6d1090

Browse files
[migration to Kotlin 2.2.20] Update Kotlin code w.r.t. KT-78866
GitOrigin-RevId: 874bbc324b30dc4031582ee51c1767b91d1fd9b3
1 parent 1669978 commit e6d1090

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

features-impl/kotlin/src/com/jetbrains/ls/api/features/impl/common/kotlin/completion/rekot/CompletionPopupFactory.kt

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,12 @@ internal object CompletionItemsProvider {
7878
}
7979
val symbolFilter: CompletionItemsCollector.SymbolFilter = when (position) {
8080
is CompletionPosition.Type if position.isAnnotation -> CompletionItemsCollector.SymbolFilter { symbol ->
81-
when (symbol) {
82-
is KaClassSymbol -> symbol.classKind == KaClassKind.ANNOTATION_CLASS
83-
is KaTypeAliasSymbol -> symbol.expandedType.expandedSymbol?.classKind == KaClassKind.ANNOTATION_CLASS
84-
else -> false
81+
with(contextOf<KaSession>()) {
82+
when (symbol) {
83+
is KaClassSymbol -> symbol.classKind == KaClassKind.ANNOTATION_CLASS
84+
is KaTypeAliasSymbol -> symbol.expandedType.expandedSymbol?.classKind == KaClassKind.ANNOTATION_CLASS
85+
else -> false
86+
}
8587
}
8688
}
8789
else -> CompletionItemsCollector.SymbolFilter { true }

0 commit comments

Comments
 (0)