Skip to content

Commit

Permalink
check first, then push types
Browse files Browse the repository at this point in the history
  • Loading branch information
Robbepop committed Nov 14, 2024
1 parent 7982d9e commit 213a72c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/wasmparser/src/validator/core.rs
Original file line number Diff line number Diff line change
Expand Up @@ -576,9 +576,9 @@ impl Module {
bail!(offset, "requires `gc` proposal to be enabled")
}
for ty in rec_group.types() {
self.check_composite_type(&ty.composite_type, features, &types, offset)?;
let id = types.push(ty.clone());
self.add_type_id(id);
self.check_composite_type(&ty.composite_type, features, &types, offset)?;
}
return Ok(());
}
Expand Down

0 comments on commit 213a72c

Please sign in to comment.