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.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/wasm/wasm-validator.cpp b/src/wasm/wasm-validator.cpp
index 8464a3aa9..2ac4e3187 100644
--- a/src/wasm/wasm-validator.cpp
+++ b/src/wasm/wasm-validator.cpp
@@ -2001,6 +2001,8 @@ void FunctionValidator::visitRefFunc(RefFunc* curr) {
shouldBeTrue(curr->type.isFunction(),
curr,
"ref.func must have a function reference type");
+ shouldBeTrue(
+ !curr->type.isNullable(), curr, "ref.func must have non-nullable type");
// TODO: verify it also has a typed function references type, and the right
// one,
// curr->type.getHeapType().getSignature()