summaryrefslogtreecommitdiff
path: root/src/wasm/wasm-validator.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/wasm/wasm-validator.cpp')
-rw-r--r--src/wasm/wasm-validator.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/wasm/wasm-validator.cpp b/src/wasm/wasm-validator.cpp
index c6de444c1..0efc8cf4f 100644
--- a/src/wasm/wasm-validator.cpp
+++ b/src/wasm/wasm-validator.cpp
@@ -718,15 +718,15 @@ void FunctionValidator::visitLocalSet(LocalSet* curr) {
"local.set index must be small enough")) {
if (curr->value->type != unreachable) {
if (curr->type != none) { // tee is ok anyhow
- shouldBeEqualOrFirstIsUnreachable(curr->value->type,
- curr->type,
- curr,
- "local.set type must be correct");
+ shouldBeEqual(getFunction()->getLocalType(curr->index),
+ curr->type,
+ curr,
+ "local.set type must be correct");
}
- shouldBeEqual(getFunction()->getLocalType(curr->index),
- curr->value->type,
+ shouldBeEqual(curr->value->type,
+ getFunction()->getLocalType(curr->index),
curr,
- "local.set type must match function");
+ "local.set's value type must be correct");
}
}
}