Skip to content

Commit 4289683

Browse files
committed
Handle the case where an inlined body is empty
1 parent d62d845 commit 4289683

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/compiler.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5496,7 +5496,9 @@ export class Compiler extends DiagnosticEmitter {
54965496
? module.createBlock(returnLabel, body, returnType.toNativeType())
54975497
: body.length > 1
54985498
? module.createBlock(null, body, returnType.toNativeType())
5499-
: body[0];
5499+
: body.length
5500+
? body[0]
5501+
: module.createNop();
55005502
}
55015503

55025504
/** Gets the trampoline for the specified function. */

0 commit comments

Comments
 (0)