]> Cypherpunks repositories - gostls13.git/commit
go/types: when type hashing, canonicalize interfaces
authorRobert Findley <rfindley@google.com>
Wed, 10 Nov 2021 20:54:00 +0000 (15:54 -0500)
committerRobert Findley <rfindley@google.com>
Sat, 13 Nov 2021 00:37:53 +0000 (00:37 +0000)
commit958f405371d942d988aef325b2103fa64028af45
treef70ade7dbe7c7f943aafffad60589f8930bdb222
parentc97d6817a3a47ce7ec30f1eebae48def30b64ad8
go/types: when type hashing, canonicalize interfaces

The interface type string preserves certain non-semantic attributes of
the type, such as embedded interfaces. We want the hash to represent the
interface identity, so hash the type set representation of the interface
instead.

Change-Id: I14081ac20b738c5fe11785e0846a9b4358594768
Reviewed-on: https://go-review.googlesource.com/c/go/+/363115
Trust: Robert Findley <rfindley@google.com>
Run-TryBot: Robert Findley <rfindley@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
src/go/types/instantiate_test.go
src/go/types/typestring.go