FIR: assure annotation argument mapping is ready

^KT-66223 fixed
This commit is contained in:
Jinseong Jeon
2024-03-06 18:41:22 -08:00
committed by teamcity
parent f3ed9476a3
commit 09f384d96e
5 changed files with 8 additions and 110 deletions
@@ -563,6 +563,11 @@ interface ConeTypeContext : TypeSystemContext, TypeSystemOptimizationContext, Ty
val annotationCall = customAnnotations.firstOrNull {
it.resolvedType.fullyExpandedType(session).classId?.asSingleFqName() == fqName
} ?: return null
if (annotationCall is FirAnnotationCall) {
annotationCall.containingDeclarationSymbol.lazyResolveToPhase(FirResolvePhase.ANNOTATION_ARGUMENTS)
}
val argument = when (val argument = annotationCall.argumentMapping.mapping.values.firstOrNull() ?: return null) {
is FirVarargArgumentsExpression -> argument.arguments.firstOrNull()
is FirArrayLiteral -> argument.arguments.firstOrNull()