[JS IR] improved missing body reporting for inliner

This commit is contained in:
Anton Bannykh
2021-11-12 13:40:26 +03:00
committed by TeamCityServer
parent bb601042df
commit e972ad9855
@@ -182,7 +182,8 @@ class FunctionInlining(
}
val evaluationStatements = evaluateArguments(callSite, copiedCallee)
val statements = (copiedCallee.body as IrBlockBody).statements
val statements = (copiedCallee.body as? IrBlockBody)?.statements
?: error("Body not found for function ${callee.render()}")
val irReturnableBlockSymbol = IrReturnableBlockSymbolImpl()
val endOffset = statements.lastOrNull()?.endOffset ?: callee.endOffset