[IR] Copy bound parameters value in Callable reference in inliner

Fix KT-47767
This commit is contained in:
Roman Artemev
2021-09-29 15:19:55 +03:00
committed by teamcityserver
parent f644f47360
commit 504ccbad88
@@ -320,7 +320,7 @@ class FunctionInlining(
val arg = boundFunctionParametersMap[parameter]!!
if (arg is IrGetValueWithoutLocation)
arg.withLocation(irCall.startOffset, irCall.endOffset)
else arg
else copyIrElement.copy(arg) as IrExpression
} else {
if (unboundIndex == valueParameters.size && parameter.defaultValue != null)
copyIrElement.copy(parameter.defaultValue!!.expression) as IrExpression