Skip to content

Commit 9a72cef

Browse files
committed
revert submodule changes; narrow element_type table assert test
1 parent 3ad1305 commit 9a72cef

3 files changed

Lines changed: 6 additions & 5 deletions

File tree

src/tests.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -506,7 +506,7 @@ mod wast_tests {
506506
("br_table.wast", _)
507507
| ("select.wast", _)
508508
| ("binary.wast", _)
509-
| ("linking.wast", _) => true,
509+
| ("linking.wast", 280) => true,
510510
_ => false,
511511
},
512512
);

src/validator.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -529,9 +529,10 @@ impl<'a> ValidatingParser<'a> {
529529
if table_index as usize >= self.resources.tables.len() {
530530
self.set_validation_error("element section table index out of bounds");
531531
} else {
532-
assert!(
533-
self.resources.tables[table_index as usize].element_type == Type::AnyFunc
534-
);
532+
if self.resources.tables[table_index as usize].element_type != Type::AnyFunc {
533+
self.set_validation_error("element_type != anyfunc is not supported yet");
534+
return;
535+
}
535536
self.init_expression_state = Some(InitExpressionState {
536537
ty: Type::I32,
537538
global_count: self.resources.globals.len(),

testsuite

Submodule testsuite updated 61 files

0 commit comments

Comments
 (0)