[IrActualizer] Don't copy attributeOwnerId in actualizer
In before, actualizer was copying attributeOwnerId to new nodes. This leads to attributeOwnerId linked to non-actualized node. It's unclear what it leads to, so we just stop doing that. In particular, if attributeOwnerId references another node, this information would be lost. ^KT-64895
This commit is contained in:
committed by
Space Team
parent
e49b28d639
commit
882dc18e0e
+5
@@ -75,6 +75,11 @@ internal class ActualizerSymbolRemapper(private val expectActualMap: Map<IrSymbo
|
||||
|
||||
internal open class ActualizerVisitor(private val symbolRemapper: SymbolRemapper, typeRemapper: TypeRemapper) :
|
||||
DeepCopyIrTreeWithSymbols(symbolRemapper, typeRemapper, SymbolRenamer.DEFAULT) {
|
||||
|
||||
// We shouldn't touch attributes, because Fir2Ir wouldn't set them to anything meaningful anyway.
|
||||
// So it would be better to have them as is, i.e. referring to `this`, not some random node removed from the tree
|
||||
override fun <D : IrAttributeContainer> D.processAttributes(other: IrAttributeContainer?): D = this
|
||||
|
||||
override fun visitModuleFragment(declaration: IrModuleFragment) =
|
||||
declaration.also { it.transformChildren(this, null) }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user