Skip to content

Commit

Permalink
go/internal/gcimporter: parse materialized aliases
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
timothy-king committed Aug 26, 2024
1 parent 7f05a25 commit bd3bb5a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/go/internal/gcimporter/iimport.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ const (
typeParamType
instanceType
unionType
aliasType
)

// iImportData imports a package from the serialized package data
Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit bd3bb5a

Please sign in to comment.