]> Cypherpunks repositories - gostls13.git/commit
go/types, types2: rename complete namedState to hasMethods
authorMark Freeman <mark@golang.org>
Mon, 20 Oct 2025 19:58:03 +0000 (15:58 -0400)
committerGopher Robot <gobot@golang.org>
Thu, 23 Oct 2025 20:04:20 +0000 (13:04 -0700)
commit8401512a9be9db590622f237f2e087b5cd79c13c
tree148e149f24c62cc458ea8dacd3dd4dc74a2a768d
parentcf826bfcb494a7dba5451bd7e4432f150590b19e
go/types, types2: rename complete namedState to hasMethods

The complete namedState tracks whether an instantiated named type has
expanded all of its methods. In the past, this was the terminal state
of a linear lifecycle, and so a term like "complete" made sense.

Now that we've expanded the lifecycle of named types to a tree structure,
the complete namedState is no longer a terminal state, and so the term
"complete" is now a bit confusing.

This change a) makes the expansion aspect of the complete namedState more
explicit and b) removes a misleading suggestion of terminality by changing
the name from complete to hasMethods.

To take a similar naming convention with the underlying namedState, which
signals presence of Named.underlying, we rename the underlying namedState
to hasUnder.

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