Skip to content

Commit 41fa72b

Browse files
dcodeIOWillem Wyndham
authored andcommitted
Handle the case where an inlined body is empty
1 parent 8b98771 commit 41fa72b

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
@@ -5501,7 +5501,9 @@ export class Compiler extends DiagnosticEmitter {
55015501
? module.createBlock(returnLabel, body, returnType.toNativeType())
55025502
: body.length > 1
55035503
? module.createBlock(null, body, returnType.toNativeType())
5504-
: body[0];
5504+
: body.length
5505+
? body[0]
5506+
: module.createNop();
55055507
}
55065508

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

0 commit comments

Comments
 (0)