]> Cypherpunks repositories - gostls13.git/commit
go/types, types2: factor out list substitution code (cleanup)
authorRobert Griesemer <gri@golang.org>
Thu, 23 May 2024 04:47:35 +0000 (21:47 -0700)
committerGopher Robot <gobot@golang.org>
Fri, 26 Jul 2024 20:05:46 +0000 (20:05 +0000)
commitdd005f43f136790c18cbf278863aa531a579040d
treee41226b727914c60e02fd0940e854ba075f38d45
parent2a3e2e9b297955d811f62b1861906a831951ef0e
go/types, types2: factor out list substitution code (cleanup)

- Replace the various subst.XList methods with a generic function.
- Rename comparable function to comparableType to avoid shadowing
  predeclared type comparable.
- Rename substFunc/Var to cloneFunc/Var which is more accurate.

Change-Id: I3243f2093e4c43a537766f47e3348402de517090
Reviewed-on: https://go-review.googlesource.com/c/go/+/587775
Reviewed-by: Robert Griesemer <gri@google.com>
Auto-Submit: Robert Griesemer <gri@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/expr.go
src/cmd/compile/internal/types2/instantiate.go
src/cmd/compile/internal/types2/named.go
src/cmd/compile/internal/types2/predicates.go
src/cmd/compile/internal/types2/subst.go
src/cmd/compile/internal/types2/typeset.go
src/go/types/expr.go
src/go/types/instantiate.go
src/go/types/named.go
src/go/types/predicates.go
src/go/types/subst.go
src/go/types/typeset.go