[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
+21
@@ -0,0 +1,21 @@
|
||||
/*
|
||||
* Copyright 2010-2024 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
// This file was generated automatically. See compiler/ir/ir.tree/tree-generator/ReadMe.md.
|
||||
// DO NOT MODIFY IT MANUALLY.
|
||||
|
||||
package org.jetbrains.kotlin.ir.declarations
|
||||
|
||||
import org.jetbrains.kotlin.ir.IrElement
|
||||
import org.jetbrains.kotlin.ir.expressions.IrConstructorCall
|
||||
|
||||
/**
|
||||
* A non-leaf IR tree element.
|
||||
*
|
||||
* Generated from: [org.jetbrains.kotlin.ir.generator.IrTree.mutableAnnotationContainer]
|
||||
*/
|
||||
interface IrMutableAnnotationContainer : IrElement, IrAnnotationContainer {
|
||||
override var annotations: List<IrConstructorCall>
|
||||
}
|
||||
+1
-5
@@ -9,8 +9,4 @@ import org.jetbrains.kotlin.ir.expressions.IrConstructorCall
|
||||
|
||||
interface IrAnnotationContainer {
|
||||
val annotations: List<IrConstructorCall>
|
||||
}
|
||||
|
||||
interface IrMutableAnnotationContainer : IrAnnotationContainer {
|
||||
override var annotations: List<IrConstructorCall>
|
||||
}
|
||||
}
|
||||
+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