1
0
mirror of https://github.com/golang/go synced 2024-11-22 03:34:40 -07:00

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 <drchase@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
This commit is contained in:
Tim King 2024-08-22 13:38:25 -07:00
parent 7f05a255a0
commit bd3bb5adf9

View File

@ -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()