From 49c688e45c9bb8782b3db4df9dcaf163a4965f6d Mon Sep 17 00:00:00 2001 From: Robert Findley Date: Fri, 13 Aug 2021 11:16:50 -0400 Subject: 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 Run-TryBot: Robert Findley TryBot-Result: Go Bot Reviewed-by: Robert Griesemer --- src/cmd/compile/internal/types2/signature.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/cmd/compile/internal/types2/signature.go') diff --git a/src/cmd/compile/internal/types2/signature.go b/src/cmd/compile/internal/types2/signature.go index c4c209b357..e319e65211 100644 --- a/src/cmd/compile/internal/types2/signature.go +++ b/src/cmd/compile/internal/types2/signature.go @@ -19,8 +19,8 @@ type Signature struct { // and store it in the Func Object) because when type-checking a function // literal we call the general type checker which returns a general Type. // We then unpack the *Signature and use the scope for the literal body. - rparams *TypeParams // receiver type parameters from left to right, or nil - tparams *TypeParams // type parameters from left to right, or nil + rparams *TParamList // receiver type parameters from left to right, or nil + tparams *TParamList // type parameters from left to right, or nil scope *Scope // function scope, present for package-local signatures recv *Var // nil if not a method params *Tuple // (incoming) parameters from left to right; or nil @@ -54,13 +54,13 @@ func NewSignature(recv *Var, params, results *Tuple, variadic bool) *Signature { func (s *Signature) Recv() *Var { return s.recv } // TParams returns the type parameters of signature s, or nil. -func (s *Signature) TParams() *TypeParams { return s.tparams } +func (s *Signature) TParams() *TParamList { return s.tparams } // SetTParams sets the type parameters of signature s. func (s *Signature) SetTParams(tparams []*TypeName) { s.tparams = bindTParams(tparams) } // RParams returns the receiver type parameters of signature s, or nil. -func (s *Signature) RParams() *TypeParams { return s.rparams } +func (s *Signature) RParams() *TParamList { return s.rparams } // SetRParams sets the receiver type params of signature s. func (s *Signature) SetRParams(rparams []*TypeName) { s.rparams = bindTParams(rparams) } -- cgit v1.2.3-54-g00ecf