aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/types2/named.go
diff options
context:
space:
mode:
authorRobert Findley <rfindley@google.com>2021-08-13 11:16:50 -0400
committerRobert Findley <rfindley@google.com>2021-08-14 15:15:20 +0000
commit49c688e45c9bb8782b3db4df9dcaf163a4965f6d (patch)
tree972e17ec2160bf331a84d072580ac81c82c31301 /src/cmd/compile/internal/types2/named.go
parentb2253c8041511fad5fdcf7514131f972f63a01a0 (diff)
downloadgo-49c688e45c9bb8782b3db4df9dcaf163a4965f6d.tar.gz
go-49c688e45c9bb8782b3db4df9dcaf163a4965f6d.zip
cmd/compile/internal/types2: rename TypeParams to TParamList
The 'TypeParams' name is too easily confused with the singular 'TypeParam', and does not say anything about what type of collection it is. We decided that TTuple was not great. TParamList seems OK for now, though perhaps a better name will emerge. Change-Id: I5eabdc91b1f666bb4c7ea8acdbebf7c372d19227 Reviewed-on: https://go-review.googlesource.com/c/go/+/341861 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>
Diffstat (limited to 'src/cmd/compile/internal/types2/named.go')
-rw-r--r--src/cmd/compile/internal/types2/named.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/cmd/compile/internal/types2/named.go b/src/cmd/compile/internal/types2/named.go
index ad29886f7d..3ce9c5b0c7 100644
--- a/src/cmd/compile/internal/types2/named.go
+++ b/src/cmd/compile/internal/types2/named.go
@@ -20,7 +20,7 @@ type Named struct {
fromRHS Type // type (on RHS of declaration) this *Named type is derived from (for cycle reporting)
underlying Type // possibly a *Named during setup; never a *Named once set up completely
instance *instance // position information for lazy instantiation, or nil
- tparams *TypeParams // type parameters, or nil
+ tparams *TParamList // type parameters, or nil
targs []Type // type arguments (after instantiation), or nil
methods []*Func // methods declared for this type (not the method set of this type); signatures are type-checked lazily
@@ -80,7 +80,7 @@ func (t *Named) load() *Named {
}
// newNamed is like NewNamed but with a *Checker receiver and additional orig argument.
-func (check *Checker) newNamed(obj *TypeName, orig *Named, underlying Type, tparams *TypeParams, methods []*Func) *Named {
+func (check *Checker) newNamed(obj *TypeName, orig *Named, underlying Type, tparams *TParamList, methods []*Func) *Named {
typ := &Named{check: check, obj: obj, orig: orig, fromRHS: underlying, underlying: underlying, tparams: tparams, methods: methods}
if typ.orig == nil {
typ.orig = typ
@@ -123,7 +123,7 @@ func (t *Named) Orig() *Named { return t.orig }
// TParams returns the type parameters of the named type t, or nil.
// The result is non-nil for an (originally) parameterized type even if it is instantiated.
-func (t *Named) TParams() *TypeParams { return t.load().tparams }
+func (t *Named) TParams() *TParamList { return t.load().tparams }
// SetTParams sets the type parameters of the named type t.
func (t *Named) SetTParams(tparams []*TypeName) { t.load().tparams = bindTParams(tparams) }