[FIR] tree: introduce containingDeclarationSymbol for annotation calls

This symbol will be used during resolution to avoid transformation
of annotations in the wrong context in the case of FIR node sharing.
The symbol should be some containing declaration symbol to be able
to answer the question "Are we own this annotation?" during resolution

^KT-63042
This commit is contained in:
Dmitrii Gridin
2023-11-14 15:28:01 +01:00
committed by Space Team
parent 1d5ab8c24f
commit 6eca9fe3a9
7 changed files with 18 additions and 0 deletions
@@ -540,6 +540,9 @@ object NodeConfigurator : AbstractFieldConfigurator<FirTreeBuilder>(FirTreeBuild
annotationCall.configure {
+field("argumentMapping", annotationArgumentMapping, withReplace = true)
+field("annotationResolvePhase", annotationResolvePhaseType, withReplace = true)
+field("containingDeclarationSymbol", firBasedSymbolType.withArgs(TypeRef.Star)).apply {
withBindThis = false
}
}
errorAnnotationCall.configure {