aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/importer
diff options
context:
space:
mode:
authorRobert Griesemer <gri@golang.org>2021-02-17 17:56:34 -0800
committerRobert Griesemer <gri@golang.org>2021-02-18 20:47:17 +0000
commit099374b55e8aed17d1e77a1084f8fb78ff2f8162 (patch)
treea93d6b9f5cd0c51a25b3072cddba372c85c850c0 /src/cmd/compile/internal/importer
parent653386a89a702b54bb01be893cfd30cddb0e6107 (diff)
downloadgo-099374b55e8aed17d1e77a1084f8fb78ff2f8162.tar.gz
go-099374b55e8aed17d1e77a1084f8fb78ff2f8162.zip
[dev.typeparams] cmd/compile/internal/types2: remove Type.Under method in favor of function
This removes the need for the aType embedded type and brings the types2.Type API in sync with the go/types.Type API. For reasons not fully understood yet, introducing the new under function causes a very long initialization cycle error, which doesn't exist in go/types. For now, circumvent the problem through a helper function variable. This CL also eliminates superflous (former) Under() method calls inside optype calls (optype takes care of this). Plus some minor misc. cleanups and comment adjustments. Change-Id: I86e13ccf6f0b34d7496240ace61a1c84856b6033 Reviewed-on: https://go-review.googlesource.com/c/go/+/293470 Reviewed-by: Robert Findley <rfindley@google.com> Trust: Robert Griesemer <gri@golang.org>
Diffstat (limited to 'src/cmd/compile/internal/importer')
-rw-r--r--src/cmd/compile/internal/importer/support.go1
1 files changed, 0 insertions, 1 deletions
diff --git a/src/cmd/compile/internal/importer/support.go b/src/cmd/compile/internal/importer/support.go
index b143913583..40b9c7c958 100644
--- a/src/cmd/compile/internal/importer/support.go
+++ b/src/cmd/compile/internal/importer/support.go
@@ -125,5 +125,4 @@ var predeclared = []types2.Type{
type anyType struct{}
func (t anyType) Underlying() types2.Type { return t }
-func (t anyType) Under() types2.Type { return t }
func (t anyType) String() string { return "any" }