[IR] Fix remapping of arguments in LocalDeclarationsLowering.

It only remapped arguments for IrGetValue and not for IrSetValue.
This is hitting Compose which has non-standard default argument
handling.
This commit is contained in:
Mads Ager
2020-11-30 13:16:23 +01:00
committed by Alexander Udalov
parent 167e60b9fb
commit a7efa5c98b
8 changed files with 94 additions and 4 deletions
@@ -305,6 +305,23 @@ class LocalDeclarationsLowering(
return expression
}
override fun visitSetValue(expression: IrSetValue): IrExpression {
expression.transformChildrenVoid(this)
val declaration = expression.symbol.owner
oldParameterToNew[declaration]?.let {
return IrSetValueImpl(
expression.startOffset,
expression.endOffset,
it.type,
it.symbol,
expression.value,
expression.origin
)
}
return expression
}
override fun visitCall(expression: IrCall): IrExpression {
expression.transformChildrenVoid(this)