IR: remove some usages of deepCopyWithVariables

At this point, `deepCopyWithVariables` is the same as
`deepCopyWithSymbols` except that the former doesn't call
`patchDeclarationParents`, which most likely produces incorrect IR in
some call sites.
This commit is contained in:
Alexander Udalov
2024-03-07 14:05:14 +01:00
committed by Space Team
parent e7e8cba1b4
commit 1d38c01afc
8 changed files with 28 additions and 43 deletions
@@ -921,10 +921,8 @@ fun IrValueParameter.copyTo(
factory.createExpressionBody(
startOffset = originalDefault.startOffset,
endOffset = originalDefault.endOffset,
expression = originalDefault.expression.deepCopyWithVariables(),
).apply {
expression.patchDeclarationParents(irFunction)
}
expression = originalDefault.expression.deepCopyWithSymbols(irFunction),
)
}
return factory.createValueParameter(
startOffset = startOffset,