AA FIR: use resolved annotation argument mapping

This commit is contained in:
Jinseong Jeon
2022-08-06 23:36:14 -07:00
committed by Nikolay Krasko
parent 56a5d883c0
commit d0a8eb5c54
4 changed files with 17 additions and 8 deletions
@@ -41,7 +41,10 @@ abstract class FirBasedSymbol<E : FirDeclaration> {
val resolvedAnnotationsWithArguments: List<FirAnnotation>
get() {
ensureResolved(FirResolvePhase.ARGUMENTS_OF_ANNOTATIONS)
// NB: annotation argument mapping (w/ vararg) are built/replaced during call completion, hence BODY_RESOLVE.
// TODO(KT-53371): optimize ARGUMENTS_OF_ANNOTATIONS to build annotation argument mapping too.
// TODO(KT-53519): Even with BODY_RESOLVE, argument mapping for annotations on [FirValueParameter] is not properly built.
ensureResolved(FirResolvePhase.BODY_RESOLVE)
return fir.annotations
}