diff options
-rw-r--r-- | src/wasm/wasm-validator.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/wasm/wasm-validator.cpp b/src/wasm/wasm-validator.cpp index d1ca5220c..5867c04a0 100644 --- a/src/wasm/wasm-validator.cpp +++ b/src/wasm/wasm-validator.cpp @@ -2454,9 +2454,11 @@ void FunctionValidator::visitTableGrow(TableGrow* curr) { } void FunctionValidator::visitTableFill(TableFill* curr) { - shouldBeTrue(getModule()->features.hasBulkMemory(), + shouldBeTrue(getModule()->features.hasBulkMemory() && + getModule()->features.hasReferenceTypes(), curr, - "table.fill requires bulk-memory [--enable-bulk-memory]"); + "table.fill requires bulk-memory [--enable-bulk-memory] and " + "reference-types [--enable-reference-types]"); auto* table = getModule()->getTableOrNull(curr->table); if (shouldBeTrue(!!table, curr, "table.fill table must exist")) { shouldBeSubType(curr->value->type, |