[IR] Don't pass originalCallee to the inliner
`originalCallee` is supposed to be the owner of the original call. It can be a fake override, and in the inliner we are using actual function with body. Apparently we can just stick with the resolved function. #KT-64807
This commit is contained in:
+4
-1
@@ -57,7 +57,10 @@ abstract class UsefulDeclarationProcessor(
|
||||
super.visitBlock(expression, data)
|
||||
|
||||
if (expression is IrReturnableBlock) {
|
||||
expression.inlineFunction?.addToUsefulPolyfilledDeclarations()
|
||||
// We need to extract `originalFunction` here because saved `inlineFunction`
|
||||
// is actually a copy made in `SaveInlineFunctionsBeforeInlining`.
|
||||
// Without this, we are not going to find proper intersection in the `saveOnlyIntersectionOfNextDeclarationsFor` method.
|
||||
expression.inlineFunction?.originalFunction?.addToUsefulPolyfilledDeclarations()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user