Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 1,062 for tparams (0.31 sec)

  1. src/go/types/named.go

    func (t *Named) TypeParams() *TypeParamList { return t.resolve().tparams }
    
    // SetTypeParams sets the type parameters of the named type t.
    // t must not have type arguments.
    func (t *Named) SetTypeParams(tparams []*TypeParam) {
    	assert(t.inst == nil)
    	t.resolve().tparams = bindTParams(tparams)
    }
    
    // TypeArgs returns the type arguments used to instantiate the named type t.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 15 20:03:31 UTC 2024
    - 24K bytes
    - Viewed (0)
  2. src/go/types/typestring.go

    }
    
    func (w *typeWriter) signature(sig *Signature) {
    	if sig.TypeParams().Len() != 0 {
    		if w.ctxt != nil {
    			assert(w.tparams == nil)
    			w.tparams = sig.TypeParams()
    			defer func() {
    				w.tparams = nil
    			}()
    		}
    		w.tParamList(sig.TypeParams().list())
    	}
    
    	w.tuple(sig.params, sig.variadic)
    
    	n := sig.results.Len()
    	if n == 0 {
    		// no result
    		return
    	}
    
    	w.byte(' ')
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 03:01:18 UTC 2024
    - 12.3K bytes
    - Viewed (0)
  3. src/cmd/vendor/golang.org/x/tools/go/types/typeutil/map.go

    				// hasher.
    				ptrMap:     h.ptrMap,
    				sigTParams: tparams,
    			}
    		}
    
    		for i := 0; i < tparams.Len(); i++ {
    			tparam := tparams.At(i)
    			hash += 7 * h.Hash(tparam.Constraint())
    		}
    
    		return hash + 3*h.hashTuple(t.Params()) + 5*h.hashTuple(t.Results())
    
    	case *types.Union:
    		return h.hashUnion(t)
    
    	case *types.Interface:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 03 02:38:00 UTC 2024
    - 13.9K bytes
    - Viewed (0)
  4. src/go/types/unify.go

    func (u *unifier) String() string {
    	// sort type parameters for reproducible strings
    	tparams := make(typeParamsById, len(u.handles))
    	i := 0
    	for tpar := range u.handles {
    		tparams[i] = tpar
    		i++
    	}
    	sort.Sort(tparams)
    
    	var buf bytes.Buffer
    	w := newTypeWriter(&buf, nil)
    	w.byte('[')
    	for i, x := range tparams {
    		if i > 0 {
    			w.string(", ")
    		}
    		w.typ(x)
    		w.string(": ")
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 11 16:24:39 UTC 2024
    - 27.9K bytes
    - Viewed (0)
  5. src/cmd/compile/internal/types2/unify.go

    func (u *unifier) String() string {
    	// sort type parameters for reproducible strings
    	tparams := make(typeParamsById, len(u.handles))
    	i := 0
    	for tpar := range u.handles {
    		tparams[i] = tpar
    		i++
    	}
    	sort.Sort(tparams)
    
    	var buf bytes.Buffer
    	w := newTypeWriter(&buf, nil)
    	w.byte('[')
    	for i, x := range tparams {
    		if i > 0 {
    			w.string(", ")
    		}
    		w.typ(x)
    		w.string(": ")
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 11 16:24:39 UTC 2024
    - 27.8K bytes
    - Viewed (0)
  6. src/cmd/vendor/golang.org/x/tools/go/ast/astutil/rewrite.go

    		a.apply(n, "Elt", nil, n.Elt)
    
    	case *ast.StructType:
    		a.apply(n, "Fields", nil, n.Fields)
    
    	case *ast.FuncType:
    		if tparams := n.TypeParams; tparams != nil {
    			a.apply(n, "TypeParams", nil, tparams)
    		}
    		a.apply(n, "Params", nil, n.Params)
    		a.apply(n, "Results", nil, n.Results)
    
    	case *ast.InterfaceType:
    		a.apply(n, "Methods", nil, n.Methods)
    
    	case *ast.MapType:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Dec 18 21:28:13 UTC 2023
    - 12.2K bytes
    - Viewed (0)
  7. src/cmd/compile/internal/types2/typestring.go

    }
    
    func (w *typeWriter) signature(sig *Signature) {
    	if sig.TypeParams().Len() != 0 {
    		if w.ctxt != nil {
    			assert(w.tparams == nil)
    			w.tparams = sig.TypeParams()
    			defer func() {
    				w.tparams = nil
    			}()
    		}
    		w.tParamList(sig.TypeParams().list())
    	}
    
    	w.tuple(sig.params, sig.variadic)
    
    	n := sig.results.Len()
    	if n == 0 {
    		// no result
    		return
    	}
    
    	w.byte(' ')
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 03:01:18 UTC 2024
    - 12.2K bytes
    - Viewed (0)
  8. src/cmd/cgo/ast.go

    		f.walk(&n.Len, ctxExpr, visit)
    		f.walk(&n.Elt, ctxType, visit)
    	case *ast.StructType:
    		f.walk(n.Fields, ctxField, visit)
    	case *ast.FuncType:
    		if tparams := funcTypeTypeParams(n); tparams != nil {
    			f.walk(tparams, ctxParam, visit)
    		}
    		f.walk(n.Params, ctxParam, visit)
    		if n.Results != nil {
    			f.walk(n.Results, ctxParam, visit)
    		}
    	case *ast.InterfaceType:
    		f.walk(n.Methods, ctxField, visit)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jun 07 16:54:27 UTC 2023
    - 14.3K bytes
    - Viewed (0)
  9. src/cmd/compile/internal/types2/subst.go

    		recv := t.recv
    
    		params := subst.tuple(t.params)
    		results := subst.tuple(t.results)
    		if params != t.params || results != t.results {
    			return &Signature{
    				rparams: t.rparams,
    				// TODO(gri) why can't we nil out tparams here, rather than in instantiate?
    				tparams: t.tparams,
    				// instantiated signatures have a nil scope
    				recv:     recv,
    				params:   params,
    				results:  results,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 03:04:07 UTC 2024
    - 11K bytes
    - Viewed (0)
  10. src/cmd/doc/pkg.go

    			}
    		}
    
    		tparam := pkg.formatTypeParams(n.TypeParams, depth)
    		param := joinStrings(params)
    		if len(results) == 0 {
    			return fmt.Sprintf("func%s(%s)", tparam, param)
    		}
    		result := joinStrings(results)
    		if !needParens {
    			return fmt.Sprintf("func%s(%s) %s", tparam, param, result)
    		}
    		return fmt.Sprintf("func%s(%s) (%s)", tparam, param, result)
    
    	case *ast.StructType:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jan 08 20:15:52 UTC 2024
    - 32K bytes
    - Viewed (0)
Back to top