[K/N] Fix for caches with LazyIR

This commit is contained in:
Igor Chevdar
2022-07-11 07:21:46 +03:00
committed by Space
parent c46c723a1b
commit 9b402a42c7
@@ -831,11 +831,11 @@ internal class CodeGeneratorVisitor(val context: Context, val lifetimes: Map<IrE
|| declaration.isExternal || declaration.isExternal
|| body == null) || body == null)
return return
val isNotInlinedLambda = declaration.origin == IrDeclarationOrigin.LOCAL_FUNCTION_FOR_LAMBDA val file = if (declaration.origin != IrDeclarationOrigin.LOCAL_FUNCTION_FOR_LAMBDA)
val file = ((declaration as? IrSimpleFunction)?.attributeOwnerId as? IrSimpleFunction) null
.takeIf { isNotInlinedLambda } else ((declaration as? IrSimpleFunction)?.attributeOwnerId as? IrSimpleFunction)?.let { context.irLinker.getFileOf(it) }?.takeIf {
?.file (currentCodeContext.fileScope() as FileScope).file != it
.takeIf { (currentCodeContext.fileScope() as FileScope).file != it } }
val scope = file?.let { val scope = file?.let {
FileScope(it) FileScope(it)
} }