From 8e478839e825f4870d5205bca5e7f7cb33905da8 Mon Sep 17 00:00:00 2001 From: Thomas Lively Date: Tue, 22 Nov 2022 11:59:22 -0600 Subject: [NFC] Expand comment about validating function type features (#5286) This addresses feedback missed in #5279. --- src/wasm/wasm-validator.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/wasm/wasm-validator.cpp') diff --git a/src/wasm/wasm-validator.cpp b/src/wasm/wasm-validator.cpp index 37fbebef9..393d28c1e 100644 --- a/src/wasm/wasm-validator.cpp +++ b/src/wasm/wasm-validator.cpp @@ -2903,7 +2903,9 @@ void FunctionValidator::visitFunction(Function* curr) { "Multivalue function results (multivalue is not enabled)"); } FeatureSet features; - // Check for things like having a rec group with GC enabled. + // Check for things like having a rec group with GC enabled. The type we're + // checking is a reference type even if this an MVP function type, so ignore + // the reference types feature here. features |= (Type(curr->type, Nullable).getFeatures() & ~FeatureSet::ReferenceTypes); for (const auto& param : curr->getParams()) { -- cgit v1.2.3