This method is unused and was not discussed in the API
proposals. Note that all error output goes through the
local sprintf which handles arguments specially.
Fixes #50760.
Change-Id: Iae66b0253cc0ece037d3d280951dc2d223c119fb
Reviewed-on: https://go-review.googlesource.com/c/go/+/381634
Trust: Robert Griesemer <gri@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
pkg go/types, method (*Term) Type() Type
pkg go/types, method (*TypeList) At(int) Type
pkg go/types, method (*TypeList) Len() int
-pkg go/types, method (*TypeList) String() string
pkg go/types, method (*TypeParam) Constraint() Type
pkg go/types, method (*TypeParam) Index() int
pkg go/types, method (*TypeParam) Obj() *TypeName
package types2
-import "bytes"
-
// TypeParamList holds a list of type parameters.
type TypeParamList struct{ tparams []*TypeParam }
return l.types
}
-func (l *TypeList) String() string {
- if l == nil || len(l.types) == 0 {
- return "[]"
- }
- var buf bytes.Buffer
- newTypeWriter(&buf, nil).typeList(l.types)
- return buf.String()
-}
-
// ----------------------------------------------------------------------------
// Implementation
package types
-import "bytes"
-
// TypeParamList holds a list of type parameters.
type TypeParamList struct{ tparams []*TypeParam }
return l.types
}
-func (l *TypeList) String() string {
- if l == nil || len(l.types) == 0 {
- return "[]"
- }
- var buf bytes.Buffer
- newTypeWriter(&buf, nil).typeList(l.types)
- return buf.String()
-}
-
// ----------------------------------------------------------------------------
// Implementation