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. */