From 42896839468d1a7017955e3b74341cdea17276a8 Mon Sep 17 00:00:00 2001 From: dcodeIO Date: Mon, 12 Nov 2018 17:30:28 +0100 Subject: [PATCH] Handle the case where an inlined body is empty --- src/compiler.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/compiler.ts b/src/compiler.ts index 41e524a0..ecaaa177 100644 --- a/src/compiler.ts +++ b/src/compiler.ts @@ -5496,7 +5496,9 @@ export class Compiler extends DiagnosticEmitter { ? module.createBlock(returnLabel, body, returnType.toNativeType()) : body.length > 1 ? module.createBlock(null, body, returnType.toNativeType()) - : body[0]; + : body.length + ? body[0] + : module.createNop(); } /** Gets the trampoline for the specified function. */