From bd3bb5adf9b68483e904d6e3076190a4fa28ffec Mon Sep 17 00:00:00 2001 From: Tim King Date: Thu, 22 Aug 2024 13:38:25 -0700 Subject: [PATCH] go/internal/gcimporter: parse materialized aliases Parse materialized aliases in indexed format. This was in https://go.dev/cl/574717 in x/tools. Updates #68778 Change-Id: I2f0871aeb5a2e74c803176001f178757766a4a0a Reviewed-on: https://go-review.googlesource.com/c/go/+/607498 Reviewed-by: David Chase LUCI-TryBot-Result: Go LUCI --- src/go/internal/gcimporter/iimport.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/go/internal/gcimporter/iimport.go b/src/go/internal/gcimporter/iimport.go index b36210c817..b2c2ad476b 100644 --- a/src/go/internal/gcimporter/iimport.go +++ b/src/go/internal/gcimporter/iimport.go @@ -77,6 +77,7 @@ const ( typeParamType instanceType unionType + aliasType ) // iImportData imports a package from the serialized package data @@ -619,7 +620,7 @@ func (r *importReader) doType(base *types.Named) types.Type { errorf("unexpected kind tag in %q: %v", r.p.ipath, k) return nil - case definedType: + case aliasType, definedType: pkg, name := r.qualifiedIdent() r.p.doDecl(pkg, name) return pkg.Scope().Lookup(name).(*types.TypeName).Type() -- 2.48.1