[IR] Store original function in the IrInlinedBlock
In Native and JS, there is a special logic where the compiler saves a copy of inlined function (see `InlineFunctionsSupport`). This copy is used in the IR inliner. Because of that, we can't really compare inlined function with other functions directly. We need to get `originalFunction` first and save it.
This commit is contained in:
@@ -162,7 +162,7 @@ class FunctionInlining(
|
||||
|
||||
val substituteMap = mutableMapOf<IrValueParameter, IrExpression>()
|
||||
|
||||
fun inline() = inlineFunction(callSite, callee, callee, true)
|
||||
fun inline() = inlineFunction(callSite, callee, callee.originalFunction, true)
|
||||
|
||||
private fun <E : IrElement> E.copy(): E {
|
||||
@Suppress("UNCHECKED_CAST")
|
||||
|
||||
Reference in New Issue
Block a user