Skip to content

Commit ac9f365

Browse files
committed
Ensure type tracking for subtypes.
When a source type is determined to be a subtype equivalent of a target type, then there is no need to do any remapping. However, we still need to track that the source type should be substituted everywhere by the target type. Signed-off-by: Ryan Levick <ryan.levick@fermyon.com>
1 parent f398c13 commit ac9f365

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

crates/wac-types/src/aggregator.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,9 @@ impl TypeAggregator {
131131
)
132132
.is_ok()
133133
{
134+
// Keep track that the source type should be replaced with the
135+
// target type wherever it's used.
136+
self.remapped.insert(source_kind.ty(), target_kind.ty());
134137
continue;
135138
}
136139

0 commit comments

Comments
 (0)