Skip to content

Commit 7003a7f

Browse files
authored
wasmparser: Parsed function types from components should be final (#1515)
1 parent eec8370 commit 7003a7f

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

crates/wasmparser/src/validator/component.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1006,7 +1006,7 @@ impl ComponentState {
10061006
self.check_options(None, &info, &options, types, offset)?;
10071007

10081008
let lowered_ty = SubType {
1009-
is_final: false,
1009+
is_final: true,
10101010
supertype_idx: None,
10111011
composite_type: CompositeType::Func(info.into_func_type()),
10121012
};
@@ -1027,7 +1027,7 @@ impl ComponentState {
10271027
) -> Result<()> {
10281028
let rep = self.check_local_resource(resource, types, offset)?;
10291029
let core_ty = SubType {
1030-
is_final: false,
1030+
is_final: true,
10311031
supertype_idx: None,
10321032
composite_type: CompositeType::Func(FuncType::new([rep], [ValType::I32])),
10331033
};
@@ -1046,7 +1046,7 @@ impl ComponentState {
10461046
) -> Result<()> {
10471047
self.resource_at(resource, types, offset)?;
10481048
let core_ty = SubType {
1049-
is_final: false,
1049+
is_final: true,
10501050
supertype_idx: None,
10511051
composite_type: CompositeType::Func(FuncType::new([ValType::I32], [])),
10521052
};
@@ -1065,7 +1065,7 @@ impl ComponentState {
10651065
) -> Result<()> {
10661066
let rep = self.check_local_resource(resource, types, offset)?;
10671067
let core_ty = SubType {
1068-
is_final: false,
1068+
is_final: true,
10691069
supertype_idx: None,
10701070
composite_type: CompositeType::Func(FuncType::new([ValType::I32], [rep])),
10711071
};

0 commit comments

Comments
 (0)