From 16bf0a7b7357b8759977803463986aa57f92e1fe Mon Sep 17 00:00:00 2001 From: Peter Huene Date: Fri, 25 Feb 2022 19:18:58 -0800 Subject: [PATCH] Allow exporting of any types in component validation. This commit allows the exporting of any component types in the validator. --- crates/wasmparser/src/validator/component.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/wasmparser/src/validator/component.rs b/crates/wasmparser/src/validator/component.rs index e26984e7c9..a557521729 100644 --- a/crates/wasmparser/src/validator/component.rs +++ b/crates/wasmparser/src/validator/component.rs @@ -808,7 +808,7 @@ impl ComponentState { ComponentEntityType::Value(*self.value_at(*idx, offset)?) } crate::ComponentExportKind::Type(idx) => { - ComponentEntityType::Type(self.interface_type_at(*idx, types, offset)?) + ComponentEntityType::Type(self.type_at(*idx, offset)?) } }) } @@ -1436,7 +1436,7 @@ impl ComponentState { crate::ComponentExportKind::Type(idx) => { insert_export( export.name, - ComponentEntityType::Type(self.interface_type_at(idx, types, offset)?), + ComponentEntityType::Type(self.type_at(idx, offset)?), &mut inst_exports, offset, )?;