Skip to content

Commit

Permalink
[Native] Evaluate moduleDeserializer only when the function body is…
Browse files Browse the repository at this point in the history
… null

#KT-67220
  • Loading branch information
ivandev0 authored and qodana-bot committed Oct 16, 2024
1 parent 0e4e400 commit e01850b
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ internal class NativeInlineFunctionResolver(

function.loweredInlineFunction?.let { return it }

val moduleDeserializer = context.irLinker.getCachedDeclarationModuleDeserializer(function)
val functionIsCached = moduleDeserializer != null && function.body == null
val moduleDeserializer = if (function.body == null) context.irLinker.getCachedDeclarationModuleDeserializer(function) else null
val functionIsCached = moduleDeserializer != null
if (functionIsCached) {
// The function is cached, get its body from the IR linker.
moduleDeserializer.deserializeInlineFunction(function)
Expand Down

0 comments on commit e01850b

Please sign in to comment.