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.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/wasm/wasm-validator.cpp b/src/wasm/wasm-validator.cpp
index 86fc4811b..8d35543fc 100644
--- a/src/wasm/wasm-validator.cpp
+++ b/src/wasm/wasm-validator.cpp
@@ -2728,11 +2728,11 @@ void FunctionValidator::visitFunction(Function* curr) {
shouldBeTrue(result.isConcrete(), curr, "results must be concretely typed");
}
for (const auto& var : curr->vars) {
- if (var.isRef() && getModule()->features.hasGCNNLocals()) {
- continue;
- }
features |= var.getFeatures();
- shouldBeTrue(var.isDefaultable(), var, "vars must be defaultable");
+ bool valid = getModule()->features.hasGCNNLocals()
+ ? var.isDefaultableOrNonNullable()
+ : var.isDefaultable();
+ shouldBeTrue(valid, var, "vars must be defaultable");
}
shouldBeTrue(features <= getModule()->features,
curr->name,