]> Cypherpunks repositories - gostls13.git/commit
go/types, types2: verify stateMask transitions in debug mode
authorMark Freeman <mark@golang.org>
Wed, 22 Oct 2025 18:04:09 +0000 (14:04 -0400)
committerGopher Robot <gobot@golang.org>
Mon, 27 Oct 2025 18:31:58 +0000 (11:31 -0700)
commitb2af92270f5e19c759b94912470a32b5e44a5b2e
tree69e4c6aabeae323e392b3d1801c2127b8a09c7ba
parent92decdcbaaef89e93163bb54885aa52fb5a13881
go/types, types2: verify stateMask transitions in debug mode

Recently, we've changed the representation of Named type state from
an integer to a bit mask, which is a bit more complicated. To make
sure we uphold state invariants, we are adding a verification step
on each state transition.

This uncovered a few places where we do not uphold the transition
invariants; those are patched in this CL.

Change-Id: I76569e4326b2d362d7a1f078641029ffb3dca531
Reviewed-on: https://go-review.googlesource.com/c/go/+/714241
Auto-Submit: Mark Freeman <markfreeman@google.com>
Reviewed-by: Robert Griesemer <gri@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