[IR] Make IrMutableAnnotationContainer an IrElement
It is required, so that IR tree generator will properly handle the `annotations` property in subsequent commits, e.g., to include them in implementation classes. All subclasses of IrMutableAnnotationContainer do already derive from IrElement. ^KT-65773 In Progress
This commit is contained in:
committed by
Space Team
parent
202c7f4677
commit
3d9194c82c
+1
@@ -38,6 +38,7 @@ val irTypeType = type(types, "IrType")
|
||||
val irFactoryType = type(declarations, "IrFactory")
|
||||
val stageControllerType = type(declarations, "StageController", TypeKind.Class)
|
||||
val idSignatureType = type(util, "IdSignature", TypeKind.Class)
|
||||
val irImplementationDetailType = type(tree, "IrImplementationDetail", TypeKind.Class)
|
||||
|
||||
val symbolType = type(symbols, "IrSymbol")
|
||||
val packageFragmentSymbolType = type(symbols, "IrPackageFragmentSymbol")
|
||||
|
||||
@@ -100,7 +100,7 @@ object IrTree : AbstractTreeBuilder() {
|
||||
val declaration: Element by element(Declaration) {
|
||||
parent(statement)
|
||||
parent(symbolOwner)
|
||||
parent(mutableAnnotationContainerType)
|
||||
parent(mutableAnnotationContainer)
|
||||
|
||||
+descriptor("DeclarationDescriptor")
|
||||
+field("origin", type(Packages.declarations, "IrDeclarationOrigin"))
|
||||
@@ -323,6 +323,14 @@ object IrTree : AbstractTreeBuilder() {
|
||||
skipInIrFactory()
|
||||
}
|
||||
}
|
||||
val mutableAnnotationContainer: Element by element(Declaration) {
|
||||
parent(type(Packages.declarations, "IrAnnotationContainer"))
|
||||
|
||||
+listField("annotations", constructorCall, mutability = Var, isChild = false) {
|
||||
fromParent = true
|
||||
skipInIrFactory()
|
||||
}
|
||||
}
|
||||
val anonymousInitializer: Element by element(Declaration) {
|
||||
parent(declarationBase)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user