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.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/wasm/wasm-validator.cpp b/src/wasm/wasm-validator.cpp
index 2039fb987..289d10b96 100644
--- a/src/wasm/wasm-validator.cpp
+++ b/src/wasm/wasm-validator.cpp
@@ -3200,9 +3200,12 @@ void FunctionValidator::visitFunction(Function* curr) {
// that is, a set allows gets until the end of the block.
LocalStructuralDominance info(curr, *getModule());
for (auto index : info.nonDominatingIndices) {
- shouldBeTrue(!curr->getLocalType(index).isNonNullable(),
- index,
- "non-nullable local's sets must dominate gets");
+ auto localType = curr->getLocalType(index);
+ for (auto type : localType) {
+ shouldBeTrue(!type.isNonNullable(),
+ index,
+ "non-nullable local's sets must dominate gets");
+ }
}
} else {
// With the special GCNNLocals feature, we allow gets anywhere, so long as