]> Cypherpunks.ru repositories - gostls13.git/commit
go/types, types2: simplify unification when x == y (pointer identity)
authorRobert Griesemer <gri@golang.org>
Fri, 24 Feb 2023 04:47:17 +0000 (20:47 -0800)
committerGopher Robot <gobot@golang.org>
Wed, 1 Mar 2023 21:01:42 +0000 (21:01 +0000)
commit35a4d1b3bc37b09d56cf045f845be1dfb282c44f
tree4570bd9702fc332befb434e4d0fd25483853f10f
parente2f2123e256094c64377008c17ca20538c4742d8
go/types, types2: simplify unification when x == y (pointer identity)

Because we rename type parameters to avoid problems with self-recursive
function calls, there's no need anymore for special (and hard to follow)
logic for pointer-identical types. If they are identical, we have a
match. Simplify the code accordingly.

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