Inlining bug fix

This commit is contained in:
Igor Chevdar
2017-04-19 18:45:31 +03:00
parent 366e28775f
commit 7f9c5e5c8b
@@ -324,7 +324,7 @@ private class Inliner(val currentScope: ScopeWithIr, val context: Context) {
val parameterToArgumentNew = mutableMapOf<ValueDescriptor, IrExpression> () // Result map parameter_descriptor -> evaluated_argument_expression.
val evaluationStatements = mutableListOf<IrStatement>() // List of evaluation statements.
parameterToArgumentOld.forEach {
val parameterDescriptor = it.parameterDescriptor.original as ValueDescriptor
val parameterDescriptor = it.parameterDescriptor
val argumentExpression = it.argumentExpression
if (!argumentNeedsEvaluation(argumentExpression)) { // If argument does not need evaluation