[IR] Change the return type of getFunctionDeclaration to be nullable

#KT-64807
This commit is contained in:
Ivan Kylchik
2024-02-07 19:14:02 +01:00
committed by Space Team
parent 91f818ba5a
commit f1bc542d74
3 changed files with 11 additions and 8 deletions
@@ -37,8 +37,8 @@ internal class JsInlineFunctionResolver(context: JsIrBackendContext) : InlineFun
return symbol == enumEntriesIntrinsic || super.shouldExcludeFunctionFromInlining(symbol)
}
override fun getFunctionDeclaration(symbol: IrFunctionSymbol): IrFunction {
val function = super.getFunctionDeclaration(symbol)
override fun getFunctionDeclaration(symbol: IrFunctionSymbol): IrFunction? {
val function = super.getFunctionDeclaration(symbol) ?: return null
return inlineFunctionsBeforeInlining[function] ?: return function
}
}