type go/types.Signature
109 uses
go/types (current package)
assignments.go#L97: if sig, _ := under(x.typ).(*Signature); sig != nil && sig.TypeParams().Len() > 0 {
assignments.go#L267: if _, ok := under(T).(*Signature); ok {
builtins.go#L1015: func makeSig(res Type, args ...Type) *Signature {
builtins.go#L1026: return &Signature{params: params, results: result}
call.go#L63: sig := x.typ.(*Signature)
call.go#L133: func (check *Checker) instantiateSignature(pos token.Pos, expr ast.Expr, typ *Signature, targs []Type, xlist []ast.Expr) (res *Signature) {
call.go#L149: inst := check.instance(pos, typ, targs, nil, check.context()).(*Signature)
call.go#L249: sig, _ := coreType(x.typ).(*Signature)
call.go#L369: 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, atxlist [][]ast.Expr) (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#L758: x.typ = x.typ.(*Signature).results.vars[0].typ
call.go#L856: sig := m.typ.(*Signature)
call.go#L884: x.typ = &Signature{
call.go#L958: sig := *obj.typ.(*Signature)
check.go#L79: sig *Signature // function signature if inside a function; nil otherwise
decl.go#L840: sig := new(Signature)
expr.go#L439: case *Pointer, *Signature, *Slice, *Map, *Chan:
expr.go#L579: case *Slice, *Signature, *Map:
expr.go#L920: sig *Signature
expr.go#L928: if sig, _ := under(typ).(*Signature); sig != nil {
expr.go#L976: case *Signature:
index.go#L39: if sig, _ := under(x.typ).(*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#L749: case *Signature:
instantiate.go#L155: case *Signature:
instantiate.go#L166: 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#L538: w.signature(f.typ.(*Signature))
mono.go#L250: case *Signature:
named.go#L406: origSig := origm.typ.(*Signature)
named.go#L430: sig = check.subst(origm.pos, origSig, smap, t, ctxt).(*Signature)
object.go#L397: func NewFunc(pos token.Pos, pkg *Package, name string, sig *Signature) *Func {
object.go#L411: func (obj *Func) Signature() *Signature {
object.go#L413: return obj.typ.(*Signature) // normal case
object.go#L423: return new(Signature)
object.go#L437: func (obj *Func) Scope() *Scope { return obj.typ.(*Signature).scope }
object.go#L465: if sig, _ := obj.typ.(*Signature); sig != nil && sig.recv != nil {
object.go#L541: WriteSignature(buf, typ.(*Signature), qf)
object.go#L646: sig := f.typ.(*Signature)
operand.go#L247: case *Signature:
predicates.go#L217: case *Slice, *Pointer, *Signature, *Map, *Chan:
predicates.go#L333: case *Signature:
predicates.go#L334: y, _ := y.(*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#L41: func NewSignature(recv *Var, params, results *Tuple, variadic bool) *Signature {
signature.go#L51: func NewSignatureType(recv *Var, recvTypeParams, typeParams []*TypeParam, params, results *Tuple, variadic bool) *Signature {
signature.go#L62: sig := &Signature{recv: recv, params: params, results: results, variadic: variadic}
signature.go#L84: func (s *Signature) Recv() *Var { return s.recv }
signature.go#L87: func (s *Signature) TypeParams() *TypeParamList { return s.tparams }
signature.go#L90: func (s *Signature) RecvTypeParams() *TypeParamList { return s.rparams }
signature.go#L93: func (s *Signature) Params() *Tuple { return s.params }
signature.go#L96: func (s *Signature) Results() *Tuple { return s.results }
signature.go#L99: func (s *Signature) Variadic() bool { return s.variadic }
signature.go#L101: func (s *Signature) Underlying() Type { return s }
signature.go#L102: func (s *Signature) String() string { return TypeString(s, nil) }
signature.go#L108: func (check *Checker) funcType(sig *Signature, recvPar *ast.FieldList, ftyp *ast.FuncType) {
stmt.go#L19: func (check *Checker) funcBody(decl *declInfo, name string, sig *Signature, body *ast.BlockStmt, iota constant.Value) {
stmt.go#L1062: case *Signature:
stmt.go#L1075: cb, _ := coreType(typ.Params().At(0).Type()).(*Signature)
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#L476: func (w *typeWriter) signature(sig *Signature) {
typexpr.go#L351: typ := new(Signature)
typexpr.go#L457: if _, ok := typ.(*Signature); ok {
unify.go#L647: case *Signature:
unify.go#L653: if y, ok := y.(*Signature); ok {
golang.org/x/exp/apidiff
apidiff.go#L205: sig, ok := t.(*types.Signature)
compatibility.go#L347: return method.Type().(*types.Signature).Recv().Type()
correspondence.go#L60: case *types.Signature:
correspondence.go#L61: if new, ok := new.(*types.Signature); ok {
messageset.go#L59: sig := f.Type().(*types.Signature)
golang.org/x/tools/go/types/objectpath
objectpath.go#L252: if recv := obj.Type().(*types.Signature).Recv(); recv == nil {
objectpath.go#L408: _, named := typesinternal.ReceiverNamed(meth.Type().(*types.Signature).Recv())
objectpath.go#L489: case *types.Signature:
objectpath.go#L675: sig, ok := t.(*types.Signature)
objectpath.go#L682: sig, ok := t.(*types.Signature)
objectpath.go#L717: sig, ok := t.(*types.Signature) // Signature
golang.org/x/tools/go/types/typeutil
map.go#L253: case *types.Signature:
map.go#L424: case *types.Signature:
golang.org/x/tools/internal/gcimporter
iexport.go#L717: sig, _ := obj.Type().(*types.Signature)
iexport.go#L827: sig, _ := m.Type().(*types.Signature)
iexport.go#L1066: case *types.Signature:
iexport.go#L1141: sig, _ := m.Type().(*types.Signature)
iexport.go#L1217: func (w *exportWriter) signature(sig *types.Signature) {
iimport.go#L1052: func (r *importReader) signature(recv *types.Var, rparams []*types.TypeParam, tparams []*types.TypeParam) *types.Signature {
ureader_yes.go#L445: func (r *reader) signature(recv *types.Var, rtparams, tparams []*types.TypeParam) *types.Signature {
ureader_yes.go#L573: sig := fn.Type().(*types.Signature)
golang.org/x/tools/internal/typeparams
free.go#L79: case *types.Signature:
golang.org/x/tools/internal/typesinternal
element.go#L39: sig := tmset.At(i).Type().(*types.Signature)
element.go#L91: 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#L270: case *types.Signature: