Index: src/wasm/ast-decoder.cc |
diff --git a/src/wasm/ast-decoder.cc b/src/wasm/ast-decoder.cc |
index c9fe4945d9e2d7035c19b174b1e96a65e1928baa..ffb815771a7c5061a94e15b5925d2c3a9810d4e6 100644 |
--- a/src/wasm/ast-decoder.cc |
+++ b/src/wasm/ast-decoder.cc |
@@ -903,7 +903,7 @@ class LR_WasmDecoder : public Decoder { |
LocalType type = LocalOperand(p->pc(), &index, &unused); |
Tree* val = p->last(); |
if (type == val->type) { |
- if (builder_) ssa_env_->locals[index] = val->node; |
+ if (build()) ssa_env_->locals[index] = val->node; |
p->tree->node = val->node; |
} else { |
error(p->pc(), val->pc, "Typecheck failed in SetLocal"); |