type go/types.Signature
134 uses
go/types (current package)
assignments.go#L97: if sig, _ := x.typ.Underlying().(*Signature); sig != nil && sig.TypeParams().Len() > 0 {
assignments.go#L267: if _, ok := T.Underlying().(*Signature); ok {
builtins.go#L110: var sig *Signature
builtins.go#L1104: func makeSig(res Type, args ...Type) *Signature {
builtins.go#L1115: return &Signature{params: params, results: result}
call.go#L62: sig := x.typ.(*Signature)
call.go#L132: func (check *Checker) instantiateSignature(pos token.Pos, expr ast.Expr, typ *Signature, targs []Type, xlist []ast.Expr) (res *Signature) {
call.go#L148: inst := check.instance(pos, typ, targs, nil, check.context()).(*Signature)
call.go#L250: if _, ok := u.(*Signature); u != nil && !ok {
call.go#L261: sig := u.(*Signature) // u must be a signature per the commonUnder condition
call.go#L373: assert(n < x.typ.(*Signature).TypeParams().Len())
call.go#L462: func (check *Checker) arguments(call *ast.CallExpr, sig *Signature, targs []Type, xlist []ast.Expr, args []*operand, atargs [][]Type) (rsig *Signature) {
call.go#L573: if asig, _ := arg.typ.(*Signature); asig != nil && asig.TypeParams().Len() > 0 {
call.go#L586: asig = tmp.(*Signature)
call.go#L643: asig := arg.typ.(*Signature)
call.go#L765: x.typ = x.typ.(*Signature).results.vars[0].typ
call.go#L857: sig := m.typ.(*Signature)
call.go#L885: x.typ = &Signature{
call.go#L959: sig := *obj.typ.(*Signature)
check.go#L83: sig *Signature // function signature if inside a function; nil otherwise
decl.go#L819: sig := new(Signature)
expr.go#L469: case *Pointer, *Signature, *Slice, *Map, *Chan:
expr.go#L609: case *Slice, *Signature, *Map:
expr.go#L950: sig *Signature
expr.go#L958: if sig, _ := typ.Underlying().(*Signature); sig != nil {
expr.go#L1013: case *Signature:
index.go#L39: if sig, _ := x.typ.Underlying().(*Signature); sig != nil && sig.TypeParams().Len() > 0 {
infer.go#L438: if sig, _ := t1.(*Signature); sig != nil && sig.TypeParams().Len() > 0 && !isParameterized(tparams, sig) {
infer.go#L598: case *Signature:
infer.go#L750: case *Signature:
instantiate.go#L150: case *Signature:
instantiate.go#L161: sig := check.subst(pos, orig, makeSubstMap(tparams.list(), targs), nil, ctxt).(*Signature)
interface.go#L61: if sig := m.typ.(*Signature); sig.recv == nil {
interface.go#L183: sig, _ := typ.(*Signature)
literals.go#L84: if sig, ok := check.typ(e.Type).(*Signature); ok {
lookup.go#L579: w.signature(f.typ.(*Signature))
mono.go#L250: case *Signature:
named.go#L474: origSig := origm.typ.(*Signature)
named.go#L498: sig = check.subst(origm.pos, origSig, smap, t, ctxt).(*Signature)
object.go#L408: func NewFunc(pos token.Pos, pkg *Package, name string, sig *Signature) *Func {
object.go#L422: func (obj *Func) Signature() *Signature {
object.go#L424: return obj.typ.(*Signature) // normal case
object.go#L434: return new(Signature)
object.go#L448: func (obj *Func) Scope() *Scope { return obj.typ.(*Signature).scope }
object.go#L476: if sig, _ := obj.typ.(*Signature); sig != nil && sig.recv != nil {
object.go#L552: WriteSignature(buf, typ.(*Signature), qf)
object.go#L657: sig := f.typ.(*Signature)
operand.go#L247: case *Signature:
predicates.go#L215: case *Slice, *Pointer, *Signature, *Map, *Chan:
predicates.go#L331: case *Signature:
predicates.go#L332: y, _ := y.(*Signature)
range.go#L241: case *Signature:
range.go#L255: cb, _ := u.(*Signature)
recording.go#L77: func (check *Checker) recordBuiltinType(f ast.Expr, sig *Signature) {
selection.go#L100: sig := *s.obj.(*Func).typ.(*Signature)
selection.go#L111: sig := *s.obj.(*Func).typ.(*Signature)
selection.go#L180: WriteSignature(&buf, T.(*Signature), qf)
signature.go#L21: type Signature struct {
signature.go#L49: func NewSignature(recv *Var, params, results *Tuple, variadic bool) *Signature {
signature.go#L68: func NewSignatureType(recv *Var, recvTypeParams, typeParams []*TypeParam, params, results *Tuple, variadic bool) *Signature {
signature.go#L109: sig := &Signature{recv: recv, params: params, results: results, variadic: variadic}
signature.go#L131: func (s *Signature) Recv() *Var { return s.recv }
signature.go#L134: func (s *Signature) TypeParams() *TypeParamList { return s.tparams }
signature.go#L137: func (s *Signature) RecvTypeParams() *TypeParamList { return s.rparams }
signature.go#L141: func (s *Signature) Params() *Tuple { return s.params }
signature.go#L144: func (s *Signature) Results() *Tuple { return s.results }
signature.go#L147: func (s *Signature) Variadic() bool { return s.variadic }
signature.go#L149: func (s *Signature) Underlying() Type { return s }
signature.go#L150: func (s *Signature) String() string { return TypeString(s, nil) }
signature.go#L156: func (check *Checker) funcType(sig *Signature, recvPar *ast.FieldList, ftyp *ast.FuncType) {
stmt.go#L18: func (check *Checker) funcBody(decl *declInfo, name string, sig *Signature, body *ast.BlockStmt, iota constant.Value) {
subst.go#L151: case *Signature:
subst.go#L170: return &Signature{
typestring.go#L66: func WriteSignature(buf *bytes.Buffer, sig *Signature, qf Qualifier) {
typestring.go#L194: case *Signature:
typestring.go#L250: w.signature(m.typ.(*Signature))
typestring.go#L370: w.signature(m.typ.(*Signature))
typestring.go#L479: func (w *typeWriter) signature(sig *Signature) {
typexpr.go#L341: typ := new(Signature)
typexpr.go#L422: if _, ok := typ.(*Signature); ok {
unify.go#L647: case *Signature:
unify.go#L653: if y, ok := y.(*Signature); ok {
go.pact.im/x/plumb/internal/discover
discover.go#L270: sig := obj.Type().(*types.Signature)
go.pact.im/x/plumb/internal/emit
name.go#L91: case *types.Signature:
render.go#L24: writeArgs(&b, args, p.Fn.Type().(*types.Signature).Variadic())
render.go#L35: writeArgs(&b, args[1:], p.Fn.Type().(*types.Signature).Variadic())
render.go#L110: case *types.Signature:
go.pact.im/x/plumb/internal/gotypes
cmp.go#L66: case *types.Signature:
cmp.go#L67: b := b.(*types.Signature)
cmp.go#L172: case *types.Signature:
gotypes.go#L168: sig, ok := types.Unalias(t).(*types.Signature)
gotypes.go#L174: sig, ok := types.Unalias(t).(*types.Signature)
subst.go#L63: sig := s.subst(mth.Type()).(*types.Signature)
subst.go#L73: case *types.Signature:
unify.go#L58: case *types.Signature:
unify.go#L59: c, ok := concrete.(*types.Signature)
unify.go#L178: case *types.Signature:
walk.go#L64: case *types.Signature:
walk.go#L153: case *types.Signature:
go.pact.im/x/plumb/internal/solve
instance.go#L91: sig, e := instSignature(ctxt, p.Fn.Type().(*types.Signature), targs)
instance.go#L139: func instSignature(ctxt *types.Context, sig *types.Signature, targs []types.Type) (*types.Signature, error) {
instance.go#L147: return t.(*types.Signature), nil
instance.go#L156: func methodSignature(p *discover.Provider, ctxt *types.Context, targs []types.Type) (recvType types.Type, sig *types.Signature, _ error) {
instance.go#L168: return owner, m.Type().(*types.Signature), nil
instance.go#L177: msig := m.Type().(*types.Signature)
instance.go#L235: func classifyParams(in *Instance, sig *types.Signature, start int) {
instance.go#L245: func classifyResults(p *discover.Provider, in *Instance, sig *types.Signature) *diag.Error {
golang.org/x/exp/apidiff
apidiff.go#L325: sig, ok := t.(*types.Signature)
correspondence.go#L64: case *types.Signature:
correspondence.go#L65: if new, ok := new.(*types.Signature); ok {
messageset.go#L91: sig := f.Type().(*types.Signature)
golang.org/x/tools/go/types/objectpath
objectpath.go#L474: case *types.Signature:
objectpath.go#L823: sig, ok := t.(*types.Signature)
objectpath.go#L830: sig, ok := t.(*types.Signature)
objectpath.go#L865: sig, ok := t.(*types.Signature) // Signature
golang.org/x/tools/go/types/typeutil
map.go#L252: case *types.Signature:
map.go#L408: case *types.Signature:
golang.org/x/tools/internal/gcimporter
iexport.go#L715: sig, _ := obj.Type().(*types.Signature)
iexport.go#L825: sig, _ := m.Type().(*types.Signature)
iexport.go#L1076: case *types.Signature:
iexport.go#L1151: sig, _ := m.Type().(*types.Signature)
iexport.go#L1227: func (w *exportWriter) signature(sig *types.Signature) {
iimport.go#L1054: func (r *importReader) signature(paramPkg *types.Package, recv *types.Var, rparams []*types.TypeParam, tparams []*types.TypeParam) *types.Signature {
ureader.go#L451: func (r *reader) signature(recv *types.Var, rtparams, tparams []*types.TypeParam) *types.Signature {
ureader.go#L588: sig := fn.Type().(*types.Signature)
golang.org/x/tools/internal/typeparams
free.go#L77: case *types.Signature:
golang.org/x/tools/internal/typesinternal
element.go#L39: sig := method.Type().(*types.Signature)
element.go#L95: case *types.Signature:
zerovalue.go#L54: case *types.Pointer, *types.Slice, *types.Chan, *types.Map, *types.Signature:
zerovalue.go#L147: case *types.Pointer, *types.Slice, *types.Chan, *types.Map, *types.Signature:
zerovalue.go#L259: case *types.Signature: