diff options
Diffstat (limited to 'src/validator.cc')
-rw-r--r-- | src/validator.cc | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/validator.cc b/src/validator.cc index 6392f884..a3a21d9b 100644 --- a/src/validator.cc +++ b/src/validator.cc @@ -1097,7 +1097,8 @@ void Validator::CheckLimits(const Location* loc, } void Validator::CheckTable(const Location* loc, const Table* table) { - if (current_table_index_ == 1 && !options_.features.reference_types_enabled()) { + if (current_table_index_ == 1 && + !options_.features.reference_types_enabled()) { PrintError(loc, "only one table allowed"); } CheckLimits(loc, &table->elem_limits, UINT32_MAX, "elems"); @@ -1105,11 +1106,12 @@ void Validator::CheckTable(const Location* loc, const Table* table) { if (table->elem_limits.is_shared) { PrintError(loc, "tables may not be shared"); } - if (table->elem_type == Type::Anyref && !options_.features.reference_types_enabled()) { + if (table->elem_type == Type::Anyref && + !options_.features.reference_types_enabled()) { PrintError(loc, "tables must have anyref type"); } - if (table->elem_type != Type::Anyref && table->elem_type != Type::Anyfunc) { - PrintError(loc, "tables must have anyref or anyfunc type"); + if (table->elem_type != Type::Anyref && table->elem_type != Type::Funcref) { + PrintError(loc, "tables must have anyref or funcref type"); } } |