From b26d325cb1fda20129deaef6e6a666efdc8f0140 Mon Sep 17 00:00:00 2001 From: Robert Griesemer Date: Tue, 14 Sep 2021 13:18:40 -0700 Subject: [PATCH] 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 Run-TryBot: Robert Griesemer TryBot-Result: Go Bot Reviewed-by: Robert Findley --- src/cmd/compile/internal/types2/predicates.go | 3 --- src/cmd/compile/internal/types2/unify.go | 3 --- 2 files changed, 6 deletions(-) diff --git a/src/cmd/compile/internal/types2/predicates.go b/src/cmd/compile/internal/types2/predicates.go index 473d22675f..aa797fccc7 100644 --- a/src/cmd/compile/internal/types2/predicates.go +++ b/src/cmd/compile/internal/types2/predicates.go @@ -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() diff --git a/src/cmd/compile/internal/types2/unify.go b/src/cmd/compile/internal/types2/unify.go index a1e5b3679b..bb69f0d27b 100644 --- a/src/cmd/compile/internal/types2/unify.go +++ b/src/cmd/compile/internal/types2/unify.go @@ -428,9 +428,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() -- 2.50.0