summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/wasm-validator.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/wasm-validator.h b/src/wasm-validator.h
index 3d9693421..7315ba4e5 100644
--- a/src/wasm-validator.h
+++ b/src/wasm-validator.h
@@ -88,7 +88,9 @@ public:
noteBreak(curr->default_, curr->value);
}
void visitSetLocal(SetLocal *curr) {
- shouldBeEqual(curr->type, curr->value->type, curr, "set_local type must be correct");
+ if (curr->value->type != unreachable) {
+ shouldBeEqual(curr->type, curr->value->type, curr, "set_local type must be correct");
+ }
}
void visitLoad(Load *curr) {
validateAlignment(curr->align);
@@ -113,9 +115,9 @@ public:
case Trunc:
case Nearest:
case Sqrt: {
- //if (curr->value->type != unreachable) {
+ if (curr->value->type != unreachable) {
shouldBeEqual(curr->value->type, curr->type, curr, "non-conversion unaries must return the same type");
- //}
+ }
break;
}
case EqZ: {