Handle the case where an inlined body is empty

This commit is contained in:
dcodeIO 2018-11-12 17:30:28 +01:00
parent d62d84521e
commit 4289683946

View File

@ -5496,7 +5496,9 @@ export class Compiler extends DiagnosticEmitter {
? module.createBlock(returnLabel, body, returnType.toNativeType()) ? module.createBlock(returnLabel, body, returnType.toNativeType())
: body.length > 1 : body.length > 1
? module.createBlock(null, body, returnType.toNativeType()) ? module.createBlock(null, body, returnType.toNativeType())
: body[0]; : body.length
? body[0]
: module.createNop();
} }
/** Gets the trampoline for the specified function. */ /** Gets the trampoline for the specified function. */