diff options
author | Robert Griesemer <gri@golang.org> | 2021-02-17 16:04:59 -0800 |
---|---|---|
committer | Robert Griesemer <gri@golang.org> | 2021-02-18 20:47:07 +0000 |
commit | 5e4da8670b13370392a9195930e3b4bbe5f1944f (patch) | |
tree | 8ba0d44ed463401d3976f9cd3ae6047645e04340 /src/cmd/compile/internal/importer | |
parent | 5ecb9a788716be799d73c5d8192368ecb9557d48 (diff) | |
download | go-5e4da8670b13370392a9195930e3b4bbe5f1944f.tar.gz go-5e4da8670b13370392a9195930e3b4bbe5f1944f.zip |
[dev.typeparams] cmd/compile/internal/types2: use converter functions rather than methods
This change replaces methods with functions to reduce the API surface of
types2.Type and to match the approach taken in go/types. The converter
methods for Named and TypeParam will be addressed in a follow-up CL.
Also: Fixed behavior of optype to return the underlying type for
arguments that are not type parameters.
Change-Id: Ia369c796754bc33bbaf0c9c8478badecb729279b
Reviewed-on: https://go-review.googlesource.com/c/go/+/293291
Trust: Robert Griesemer <gri@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
Diffstat (limited to 'src/cmd/compile/internal/importer')
-rw-r--r-- | src/cmd/compile/internal/importer/support.go | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/src/cmd/compile/internal/importer/support.go b/src/cmd/compile/internal/importer/support.go index 4f013f4a51..cac87745fe 100644 --- a/src/cmd/compile/internal/importer/support.go +++ b/src/cmd/compile/internal/importer/support.go @@ -129,16 +129,5 @@ func (t anyType) Under() types2.Type { return t } func (t anyType) String() string { return "any" } // types2.aType is not exported for now so we need to implemented these here. -func (anyType) Basic() *types2.Basic { return nil } -func (anyType) Array() *types2.Array { return nil } -func (anyType) Slice() *types2.Slice { return nil } -func (anyType) Struct() *types2.Struct { return nil } -func (anyType) Pointer() *types2.Pointer { return nil } -func (anyType) Tuple() *types2.Tuple { return nil } -func (anyType) Signature() *types2.Signature { return nil } -func (anyType) Sum() *types2.Sum { return nil } -func (anyType) Interface() *types2.Interface { return nil } -func (anyType) Map() *types2.Map { return nil } -func (anyType) Chan() *types2.Chan { return nil } func (anyType) Named() *types2.Named { return nil } func (anyType) TypeParam() *types2.TypeParam { return nil } |