]> Cypherpunks repositories - gostls13.git/commit
go/types: make typeset return an iterator
authorAlan Donovan <adonovan@google.com>
Fri, 18 Jul 2025 18:19:26 +0000 (14:19 -0400)
committerGopher Robot <gobot@golang.org>
Thu, 25 Sep 2025 15:00:44 +0000 (08:00 -0700)
commit6b32c613ca2e69449b66ed552b93562e6be70577
tree9e5bcb74742f55d23c8de8e09926023fb3843064
parentfbba93027174956a57c8b4493cbf0d0521b65774
go/types: make typeset return an iterator

typeset(t) now returns a func equivalent to iter.Seq2[Type, Type]
for the sequence over (type, underlying) pairs in the typeset of t.

underIs was modified to take advantage of the underlying iteration
primitive, all, which computes the desired boolean conjunction
directly.

Change-Id: I3e17d5970fd2908c5dca0754db3e251bf1200af2
Reviewed-on: https://go-review.googlesource.com/c/go/+/688876
Auto-Submit: Alan Donovan <adonovan@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Robert Findley <rfindley@google.com>
12 files changed:
src/cmd/compile/internal/types2/builtins.go
src/cmd/compile/internal/types2/index.go
src/cmd/compile/internal/types2/signature.go
src/cmd/compile/internal/types2/typeparam.go
src/cmd/compile/internal/types2/typeset.go
src/cmd/compile/internal/types2/under.go
src/go/types/builtins.go
src/go/types/index.go
src/go/types/signature.go
src/go/types/typeparam.go
src/go/types/typeset.go
src/go/types/under.go