From ef5a3303b21d827c7af5c257a1fe7ebd6e555444 Mon Sep 17 00:00:00 2001 From: Dmitrii Gridin Date: Wed, 2 Nov 2022 14:43:59 +0100 Subject: [PATCH] [FIR] FirBasedSymbol: add internal annotation for internal things ^KT-54417 --- .../src/org/jetbrains/kotlin/fir/symbols/FirBasedSymbol.kt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/compiler/fir/tree/src/org/jetbrains/kotlin/fir/symbols/FirBasedSymbol.kt b/compiler/fir/tree/src/org/jetbrains/kotlin/fir/symbols/FirBasedSymbol.kt index 0684ced108f..5e3c7a54f44 100644 --- a/compiler/fir/tree/src/org/jetbrains/kotlin/fir/symbols/FirBasedSymbol.kt +++ b/compiler/fir/tree/src/org/jetbrains/kotlin/fir/symbols/FirBasedSymbol.kt @@ -52,16 +52,19 @@ abstract class FirBasedSymbol { get() = fir.resolvedAnnotationClassIds(this) } +@SymbolInternals fun FirAnnotationContainer.resolvedAnnotationsWithArguments(anchorElement: FirBasedSymbol<*>): List { anchorElement.lazyResolveToPhase(FirResolvePhase.ANNOTATIONS_ARGUMENTS_MAPPING) return annotations } +@SymbolInternals fun FirAnnotationContainer.resolvedAnnotationsWithClassIds(anchorElement: FirBasedSymbol<*>): List { anchorElement.lazyResolveToPhase(FirResolvePhase.TYPES) return annotations } +@SymbolInternals fun FirAnnotationContainer.resolvedAnnotationClassIds(anchorElement: FirBasedSymbol<*>): List { anchorElement.lazyResolveToPhase(FirResolvePhase.TYPES) return annotations.mapNotNull { (it.annotationTypeRef.coneType as? ConeClassLikeType)?.lookupTag?.classId }