diff options
Diffstat (limited to 'src/wasm/wasm-binary.cpp')
-rw-r--r-- | src/wasm/wasm-binary.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/wasm/wasm-binary.cpp b/src/wasm/wasm-binary.cpp index 0d405251e..684afe80c 100644 --- a/src/wasm/wasm-binary.cpp +++ b/src/wasm/wasm-binary.cpp @@ -6936,7 +6936,10 @@ void WasmBinaryReader::visitCallRef(CallRef* curr) { for (size_t i = 0; i < num; i++) { curr->operands[num - i - 1] = popNonVoidExpression(); } - curr->finalize(sig.results); + // If the target has bottom type, we won't be able to infer the correct type + // from it, so set the type manually to be safe. + curr->type = sig.results; + curr->finalize(); } bool WasmBinaryReader::maybeVisitI31New(Expression*& out, uint32_t code) { |