mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-06-12 14:31:28 +00:00
Handle the case where an inlined body is empty
This commit is contained in:
@ -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. */
|
||||
|
Reference in New Issue
Block a user