]> Cypherpunks repositories - gostls13.git/commit
go/types, types2: rename Named.resolve to unpack
authorMark Freeman <mark@golang.org>
Mon, 20 Oct 2025 21:00:03 +0000 (17:00 -0400)
committerGopher Robot <gobot@golang.org>
Thu, 23 Oct 2025 20:20:04 +0000 (13:20 -0700)
commit03bd43e8bb314f1bf1872a41f470bde72ac00b5c
tree0a870e5c7c7e8c429b97ad2c4d540bcc4417db6a
parent9fcdc814b200da8d7e5bc8c9b89e42393c26c63d
go/types, types2: rename Named.resolve to unpack

Named.resolve normalizes a named type's representation so that type
operations have a uniform surface to work with, regardless of how
the type was created.

This often gives the type a heavier footprint, such as when filling
in a lazy-loaded type from UIR, or expanding the RHS of an
instantiated type.

For that reason, it seems more appropriate to call this "unpacking"
the type, as it hints to this heavier form. The term "resolving"
is used in many contexts, and generally suggests that we are
trying to figure out what a name means.

Change-Id: Ia733fd68656380b2be4f7433b7b971b7c1422783
Reviewed-on: https://go-review.googlesource.com/c/go/+/713285
Auto-Submit: Mark Freeman <markfreeman@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Robert Griesemer <gri@google.com>
src/cmd/compile/internal/types2/decl.go
src/cmd/compile/internal/types2/named.go
src/cmd/compile/internal/types2/object.go
src/cmd/compile/internal/types2/validtype.go
src/go/types/decl.go
src/go/types/named.go
src/go/types/object.go
src/go/types/validtype.go