1
0
mirror of https://github.com/golang/go synced 2024-11-24 06:30:22 -07:00

cmd/compile/internal/types2: remove some unnecessary loading/expansion of Named types

This is a clean port of CL 349409 from go/types to types2.

Change-Id: I2deb9ce46e6dcda736fda2169912c02163930d7d
Reviewed-on: https://go-review.googlesource.com/c/go/+/349991
Trust: Robert Griesemer <gri@golang.org>
Run-TryBot: Robert Griesemer <gri@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
This commit is contained in:
Robert Griesemer 2021-09-14 13:18:40 -07:00
parent 9fc28892cb
commit b26d325cb1
2 changed files with 0 additions and 6 deletions

View File

@ -302,9 +302,6 @@ func identical(x, y Type, cmpTags bool, p *ifacePair) bool {
// Two named types are identical if their type names originate // Two named types are identical if their type names originate
// in the same type declaration. // in the same type declaration.
if y, ok := y.(*Named); ok { if y, ok := y.(*Named); ok {
x.expand(nil)
y.expand(nil)
xargs := x.TypeArgs().list() xargs := x.TypeArgs().list()
yargs := y.TypeArgs().list() yargs := y.TypeArgs().list()

View File

@ -428,9 +428,6 @@ func (u *unifier) nify(x, y Type, p *ifacePair) bool {
case *Named: case *Named:
if y, ok := y.(*Named); ok { if y, ok := y.(*Named); ok {
x.expand(nil)
y.expand(nil)
xargs := x.targs.list() xargs := x.targs.list()
yargs := y.targs.list() yargs := y.targs.list()