mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-04-29 00:42:16 +00:00
Handle the case where an inlined body is empty
This commit is contained in:
parent
d62d84521e
commit
4289683946
@ -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. */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user