Skip to content

Commit

Permalink
wasmparser: Parsed function types from components should be final (#1515
Browse files Browse the repository at this point in the history
)
  • Loading branch information
fitzgen authored Apr 24, 2024
1 parent eec8370 commit 7003a7f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions crates/wasmparser/src/validator/component.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1006,7 +1006,7 @@ impl ComponentState {
self.check_options(None, &info, &options, types, offset)?;

let lowered_ty = SubType {
is_final: false,
is_final: true,
supertype_idx: None,
composite_type: CompositeType::Func(info.into_func_type()),
};
Expand All @@ -1027,7 +1027,7 @@ impl ComponentState {
) -> Result<()> {
let rep = self.check_local_resource(resource, types, offset)?;
let core_ty = SubType {
is_final: false,
is_final: true,
supertype_idx: None,
composite_type: CompositeType::Func(FuncType::new([rep], [ValType::I32])),
};
Expand All @@ -1046,7 +1046,7 @@ impl ComponentState {
) -> Result<()> {
self.resource_at(resource, types, offset)?;
let core_ty = SubType {
is_final: false,
is_final: true,
supertype_idx: None,
composite_type: CompositeType::Func(FuncType::new([ValType::I32], [])),
};
Expand All @@ -1065,7 +1065,7 @@ impl ComponentState {
) -> Result<()> {
let rep = self.check_local_resource(resource, types, offset)?;
let core_ty = SubType {
is_final: false,
is_final: true,
supertype_idx: None,
composite_type: CompositeType::Func(FuncType::new([ValType::I32], [rep])),
};
Expand Down

0 comments on commit 7003a7f

Please sign in to comment.