fix: handle aliased pattern and simplify testcase

This commit is contained in:
Khanh Duong Quoc 2024-10-24 20:17:24 +09:00
parent cf5f1e8620
commit 962d340460
No known key found for this signature in database
GPG key ID: 68399C39885161F3
2 changed files with 32 additions and 23 deletions

View file

@ -294,7 +294,7 @@ pub(crate) fn render_resolution_with_import_pat(
import_edit: LocatedImport,
) -> Option<Builder> {
let resolution = ScopeDef::from(import_edit.original_item);
let local_name = scope_def_to_name(resolution, &ctx, &import_edit)?;
let local_name = get_import_name(resolution, &ctx, &import_edit)?;
Some(render_resolution_pat(ctx, pattern_ctx, local_name, Some(import_edit), resolution))
}