From 4c4be0aeaaad758e703724fe4a6575768017ac53 Mon Sep 17 00:00:00 2001 From: "Giau. Tran Minh" <12751435+giautm@users.noreply.github.com> Date: Thu, 5 Sep 2024 04:40:05 -0700 Subject: [PATCH] codegen: Unalias before lookup type (#3247) --- codegen/templates/import.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/codegen/templates/import.go b/codegen/templates/import.go index c26bdeab7f5..eb26ea79682 100644 --- a/codegen/templates/import.go +++ b/codegen/templates/import.go @@ -116,7 +116,7 @@ func (s *Imports) Lookup(path string) string { } func (s *Imports) LookupType(t types.Type) string { - return types.TypeString(t, func(i *types.Package) string { + return types.TypeString(code.Unalias(t), func(i *types.Package) string { return s.Lookup(i.Path()) }) }