@@ -61,11 +61,11 @@ func (s *Signature) TypeParams() *TypeParamList { return s.tparams }
61
61
// SetTypeParams sets the type parameters of signature s.
62
62
func (s * Signature ) SetTypeParams (tparams []* TypeParam ) { s .tparams = bindTParams (tparams ) }
63
63
64
- // RParams returns the receiver type parameters of signature s, or nil.
65
- func (s * Signature ) RParams () * TypeParamList { return s .rparams }
64
+ // RecvTypeParams returns the receiver type parameters of signature s, or nil.
65
+ func (s * Signature ) RecvTypeParams () * TypeParamList { return s .rparams }
66
66
67
- // SetRParams sets the receiver type params of signature s.
68
- func (s * Signature ) SetRParams (rparams []* TypeParam ) { s .rparams = bindTParams (rparams ) }
67
+ // SetRecvTypeParams sets the receiver type params of signature s.
68
+ func (s * Signature ) SetRecvTypeParams (rparams []* TypeParam ) { s .rparams = bindTParams (rparams ) }
69
69
70
70
// Params returns the parameters of signature s, or nil.
71
71
func (s * Signature ) Params () * Tuple { return s .params }
@@ -133,14 +133,14 @@ func (check *Checker) funcType(sig *Signature, recvPar *ast.FieldList, ftyp *ast
133
133
}
134
134
// provide type parameter bounds
135
135
// - only do this if we have the right number (otherwise an error is reported elsewhere)
136
- if sig .RParams ().Len () == len (recvTParams ) {
136
+ if sig .RecvTypeParams ().Len () == len (recvTParams ) {
137
137
// We have a list of *TypeNames but we need a list of Types.
138
- list := make ([]Type , sig .RParams ().Len ())
139
- for i , t := range sig .RParams ().list () {
138
+ list := make ([]Type , sig .RecvTypeParams ().Len ())
139
+ for i , t := range sig .RecvTypeParams ().list () {
140
140
list [i ] = t
141
141
}
142
142
smap := makeSubstMap (recvTParams , list )
143
- for i , tpar := range sig .RParams ().list () {
143
+ for i , tpar := range sig .RecvTypeParams ().list () {
144
144
bound := recvTParams [i ].bound
145
145
// bound is (possibly) parameterized in the context of the
146
146
// receiver type declaration. Substitute parameters for the
@@ -203,7 +203,7 @@ func (check *Checker) funcType(sig *Signature, recvPar *ast.FieldList, ftyp *ast
203
203
T .expand (nil )
204
204
// The receiver type may be an instantiated type referred to
205
205
// by an alias (which cannot have receiver parameters for now).
206
- if T .TypeArgs () != nil && sig .RParams () == nil {
206
+ if T .TypeArgs () != nil && sig .RecvTypeParams () == nil {
207
207
check .errorf (atPos (recv .pos ), _Todo , "cannot define methods on instantiated type %s" , recv .typ )
208
208
break
209
209
}
0 commit comments