Skip to content

Commit

Permalink
Inline: need to clone all arguments for inline function call
Browse files Browse the repository at this point in the history
  • Loading branch information
homuroll committed Apr 4, 2017
1 parent 791712a commit fffbff1
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ internal class FunctionInlining(val context: Context): IrElementTransformerVoid(
override fun visitGetValue(expression: IrGetValue): IrExpression {
val newExpression = super.visitGetValue(expression) as IrGetValue
val descriptor = newExpression.descriptor
val argument = substituteMap[descriptor] // Find expression to replace this parameter.
val argument = substituteMap[descriptor]?.accept(InlineCopyIr(), null) as IrExpression? // Find expression to replace this parameter.
if (argument == null) return newExpression // If there is no such expression - do nothing

return argument
Expand Down

0 comments on commit fffbff1

Please sign in to comment.