From 8bcdd2f4e67ab842fa0e5467b1e9f2fa9c40dfb8 Mon Sep 17 00:00:00 2001 From: Yi LIU Date: Thu, 12 Feb 2026 20:15:11 +0800 Subject: [PATCH] Fix incorrect error message when merging world imports The error context said "mismatched type for export" when the mismatch was actually in the imports section of a world merge. Changed to "mismatched type for import" to correctly describe the error. --- crates/wac-types/src/aggregator.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/wac-types/src/aggregator.rs b/crates/wac-types/src/aggregator.rs index de10c18..808772d 100644 --- a/crates/wac-types/src/aggregator.rs +++ b/crates/wac-types/src/aggregator.rs @@ -227,7 +227,7 @@ impl TypeAggregator { // We'll remap the source below and replace checker .is_subtype(*source_kind, types, target_kind, &self.types) - .with_context(|| format!("mismatched type for export `{name}`"))?; + .with_context(|| format!("mismatched type for import `{name}`"))?; } let remapped = self.remap_item_kind(types, *source_kind, checker)?;