go/types.TypeParamList.Len (method)
48 uses
go/types (current package)
assignments.go#L75: if sig, _ := under(x.typ).(*Signature); sig != nil && sig.TypeParams().Len() > 0 {
call.go#L34: got, want := len(targs), sig.TypeParams().Len()
call.go#L56: assert(res.TypeParams().Len() == 0) // signature is not generic anymore
call.go#L65: assert(len(targs) == typ.TypeParams().Len())
call.go#L197: got, want := len(targs), sig.TypeParams().Len()
call.go#L209: isGeneric := sig.TypeParams().Len() > 0
call.go#L212: if isGeneric && sig.TypeParams().Len() == 0 {
call.go#L237: if x.mode == value && sig.TypeParams().Len() > 0 && isParameterized(sig.TypeParams().list(), x.typ) {
call.go#L380: if sig.TypeParams().Len() > 0 {
call.go#L397: assert(rsig.TypeParams().Len() == 0) // signature is not generic anymore
index.go#L38: if sig, _ := under(x.typ).(*Signature); sig != nil && sig.TypeParams().Len() > 0 {
infer.go#L99: selfRecursive := check.sig != nil && check.sig.tparams.Len() > 0 && tparams[0] == check.sig.tparams.At(0)
instantiate.go#L89: if !check.validateTArgLen(pos, tparams.Len(), len(targs)) {
instantiate.go#L92: if tparams.Len() == 0 {
named.go#L175: if origSig.RecvTypeParams().Len() == t.targs.Len() {
named.go#L371: if n.orig.tparams.Len() == n.targs.Len() {
object.go#L470: if t.TypeParams().Len() > 0 {
predicates.go#L262: if x.TypeParams().Len() != y.TypeParams().Len() {
predicates.go#L271: if x.TypeParams().Len() > 0 {
subst.go#L216: if t.orig.TypeParams().Len() == 0 {
subst.go#L222: if t.targs.Len() != t.orig.TypeParams().Len() {
subst.go#L237: newTArgs = make([]Type, t.orig.TypeParams().Len())
typelists.go#L12: func (l *TypeParamList) Len() int { return len(l.list()) }
typestring.go#L292: } else if w.ctxt == nil && t.TypeParams().Len() != 0 { // For type hashing, don't need to format the TypeParams
typestring.go#L440: if sig.TypeParams().Len() != 0 {
typexpr.go#L475: if check.validateTArgLen(pos, inst.tparams.Len(), inst.targs.Len()) {
validtype.go#L130: n, m := targs.Len(), tparams.Len()
golang.org/x/exp/apidiff
correspondence.go#L206: if tps1.Len() != tps2.Len() {
correspondence.go#L209: for i := 0; i < tps1.Len(); i++ {
correspondence.go#L239: if oldps.Len() != newps.Len() {
correspondence.go#L242: if oldps.Len() == 0 {
correspondence.go#L246: for i := 0; i < oldps.Len(); i++ {
golang.org/x/tools/internal/gcimporter
iexport.go#L460: if typeparams.ForSignature(sig).Len() == 0 {
iexport.go#L473: if tparams := typeparams.ForSignature(sig); tparams.Len() > 0 {
iexport.go#L514: if typeparams.ForNamed(named).Len() == 0 {
iexport.go#L521: if typeparams.ForNamed(named).Len() > 0 {
iexport.go#L544: if rparams := typeparams.RecvTypeParams(sig); rparams.Len() > 0 {
iexport.go#L546: for i := 0; i < rparams.Len(); i++ {
iexport.go#L854: ll := uint64(list.Len())
iexport.go#L856: for i := 0; i < list.Len(); i++ {
golang.org/x/tools/internal/typeparams
common.go#L103: if ForNamed(named).Len() == 0 {
common.go#L147: if vtparams.Len() == 0 || vtparams.Len() != ttparams.Len() || NamedTypeArgs(VN).Len() != 0 || NamedTypeArgs(TN).Len() != 0 {
common.go#L164: for i := 0; i < vtparams.Len(); i++ {