mirror of
https://github.com/golang/go
synced 2024-11-24 01:50:11 -07:00
go/types: remove some unnecessary loading/expansion of Named types
For Identical an u.nify, only type arguments and pointer identity is needed. Change-Id: Id4018d2a53044fa20fd26d28890f28b37b6d6d70 Reviewed-on: https://go-review.googlesource.com/c/go/+/349409 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>
This commit is contained in:
parent
0d8a4bfc96
commit
ad97d204f0
@ -302,9 +302,6 @@ func identical(x, y Type, cmpTags bool, p *ifacePair) bool {
|
||||
// Two named types are identical if their type names originate
|
||||
// in the same type declaration.
|
||||
if y, ok := y.(*Named); ok {
|
||||
x.expand(nil)
|
||||
y.expand(nil)
|
||||
|
||||
xargs := x.TypeArgs().list()
|
||||
yargs := y.TypeArgs().list()
|
||||
|
||||
|
@ -425,9 +425,6 @@ func (u *unifier) nify(x, y Type, p *ifacePair) bool {
|
||||
|
||||
case *Named:
|
||||
if y, ok := y.(*Named); ok {
|
||||
x.expand(nil)
|
||||
y.expand(nil)
|
||||
|
||||
xargs := x.targs.list()
|
||||
yargs := y.targs.list()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user