diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/asm2wasm.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/asm2wasm.h b/src/asm2wasm.h index 2fbe4d0ae..6327920fe 100644 --- a/src/asm2wasm.h +++ b/src/asm2wasm.h @@ -478,8 +478,14 @@ private: } FunctionType* getFunctionType(Ref parent, ExpressionList& operands) { - // generate signature - WasmType result = !!parent ? detectWasmType(parent, nullptr) : none; + WasmType result = none; + if (!!parent) { + // if the parent is a seq, we cannot be the last element in it (we would have a coercion, which would be + // the parent), so we must be (us, somethingElse), and so our return is void + if (parent[0] != SEQ) { + result = detectWasmType(parent, nullptr); + } + } return ensureFunctionType(getSig(result, operands), &wasm); } |