]> Cypherpunks repositories - gostls13.git/commit
go/types, types2: use a comparer struct to control the identical predicate
authorRobert Griesemer <gri@golang.org>
Thu, 2 Feb 2023 22:16:23 +0000 (14:16 -0800)
committerGopher Robot <gobot@golang.org>
Thu, 2 Feb 2023 23:39:19 +0000 (23:39 +0000)
commit3313880bdcb29d24dc5068b3a0f1bdd102c12b13
tree336dfad4e26897d4032056b4e2eff76306c24a8f
parent88a36c9e9a511ec6ad218633bce1e82f25e54d35
go/types, types2: use a comparer struct to control the identical predicate

This makes it easier to configure the behavior of identical: we can
simply add fields to the comparer instead of adding more parameters
to identical.

Change-Id: I9a6f5451b3ee5c37e71486060653c5a6e8f24304
Reviewed-on: https://go-review.googlesource.com/c/go/+/464937
Auto-Submit: Robert Griesemer <gri@google.com>
Reviewed-by: Robert Findley <rfindley@google.com>
Run-TryBot: Robert Griesemer <gri@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Robert Griesemer <gri@google.com>
src/cmd/compile/internal/types2/api.go
src/cmd/compile/internal/types2/predicates.go
src/go/types/api.go
src/go/types/predicates.go