]> Cypherpunks repositories - gostls13.git/commit
go/types, types2: add unifyMode to unifier, pass it through
authorRobert Griesemer <gri@golang.org>
Sat, 27 May 2023 21:31:14 +0000 (14:31 -0700)
committerGopher Robot <gobot@golang.org>
Tue, 30 May 2023 20:19:18 +0000 (20:19 +0000)
commitf78483eaac3a678ef242cc04e05a330c8a92a992
treea3e84d444a3baeea7e0e832965299bb4aba0d95e
parent8c5d1a41ad53d9a24885c760cca9002275807d48
go/types, types2: add unifyMode to unifier, pass it through

Pass a mode parameter through all unifier calls but make no use of it.
When unifying type elements (components of composite types), use emode,
which currently is set to mode.

Preparatory step to fix #60460. Factoring out this mechanical change
will make the actual fix smaller and easier to review and understand.
Because this change doesn't affect the behavior of the unifier, it is
safe.

For #60460.

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