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 08c2d46b248..95591eea535 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 @@ -59,15 +59,10 @@ abstract class FirBasedSymbol { @SymbolInternals fun FirAnnotationContainer.resolvedCompilerRequiredAnnotations(anchorElement: FirBasedSymbol<*>): List { - return annotations.resolvedCompilerRequiredAnnotations(anchorElement) -} - -@SymbolInternals -fun List.resolvedCompilerRequiredAnnotations(anchorElement: FirBasedSymbol<*>): List { - if (isEmpty()) return emptyList() + if (annotations.isEmpty()) return emptyList() anchorElement.lazyResolveToPhase(FirResolvePhase.COMPILER_REQUIRED_ANNOTATIONS) - return this + return annotations } @SymbolInternals @@ -114,15 +109,10 @@ fun List.resolvedAnnotationsWithClassIds(anchorElement: FirBasedS @SymbolInternals fun FirAnnotationContainer.resolvedAnnotationClassIds(anchorElement: FirBasedSymbol<*>): List { - return annotations.resolvedAnnotationClassIds(anchorElement) -} - -@SymbolInternals -fun List.resolvedAnnotationClassIds(anchorElement: FirBasedSymbol<*>): List { - if (isEmpty()) return emptyList() + if (annotations.isEmpty()) return emptyList() anchorElement.lazyResolveToPhase(FirResolvePhase.TYPES) - return mapNotNull { (it.annotationTypeRef.coneType as? ConeClassLikeType)?.lookupTag?.classId } + return annotations.mapNotNull { (it.annotationTypeRef.coneType as? ConeClassLikeType)?.lookupTag?.classId } } @RequiresOptIn