Skip to content

Commit

Permalink
Fix subtyping bug in cont.new
Browse files Browse the repository at this point in the history
  • Loading branch information
dhil committed May 3, 2024
1 parent ae5a5a7 commit 85373c0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/wasmparser/src/validator/operators.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3765,7 +3765,7 @@ where
self.resources.check_heap_type(&mut c_hty, self.offset)?;
let f_idx = self.cont_type_of_heap_type(c_hty)?.0;
let f_hty = f_idx.pack().expect("hty should be previously validated");
let expected_rt = RefType::concrete(false, f_hty);
let expected_rt = RefType::concrete(true, f_hty);
self.pop_operand(Some(ValType::Ref(expected_rt)))?;
let result =
ValType::Ref(RefType::new(false, c_hty).expect("hty should be previously validated"));
Expand Down

0 comments on commit 85373c0

Please sign in to comment.