Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 1,062 for tparams (0.37 sec)

  1. src/cmd/compile/internal/types2/instantiate.go

    	if validate {
    		tparams := orig_.TypeParams().list()
    		assert(len(tparams) > 0)
    		if len(targs) != len(tparams) {
    			return nil, fmt.Errorf("got %d type arguments but %s has %d type parameters", len(targs), orig, len(tparams))
    		}
    		if i, err := (*Checker)(nil).verify(nopos, tparams, targs, ctxt); err != nil {
    			return nil, &ArgumentError{i, err}
    		}
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 03:01:18 UTC 2024
    - 12.7K bytes
    - Viewed (0)
  2. src/go/types/instantiate.go

    	if validate {
    		tparams := orig_.TypeParams().list()
    		assert(len(tparams) > 0)
    		if len(targs) != len(tparams) {
    			return nil, fmt.Errorf("got %d type arguments but %s has %d type parameters", len(targs), orig, len(tparams))
    		}
    		if i, err := (*Checker)(nil).verify(nopos, tparams, targs, ctxt); err != nil {
    			return nil, &ArgumentError{i, err}
    		}
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 03:01:18 UTC 2024
    - 12.8K bytes
    - Viewed (0)
  3. src/cmd/compile/internal/types2/typelists.go

    // TypeParamList holds a list of type parameters.
    type TypeParamList struct{ tparams []*TypeParam }
    
    // Len returns the number of type parameters in the list.
    // It is safe to call on a nil receiver.
    func (l *TypeParamList) Len() int { return len(l.list()) }
    
    // At returns the i'th type parameter in the list.
    func (l *TypeParamList) At(i int) *TypeParam { return l.tparams[i] }
    
    // list is for internal use where we expect a []*TypeParam.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jan 28 22:21:55 UTC 2022
    - 1.8K bytes
    - Viewed (0)
  4. src/go/types/call.go

    		// are rare.)
    		name := ""
    		if len(params) > 0 && params[0].name != "" {
    			// name needed
    			name = sig.recv.name
    			if name == "" {
    				name = "_"
    			}
    		}
    		params = append([]*Var{NewVar(sig.recv.pos, sig.recv.pkg, name, x.typ)}, params...)
    		x.mode = value
    		x.typ = &Signature{
    			tparams:  sig.tparams,
    			params:   NewTuple(params...),
    			results:  sig.results,
    			variadic: sig.variadic,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 33.5K bytes
    - Viewed (0)
  5. src/cmd/compile/internal/types2/alias.go

    func (a *Alias) TypeParams() *TypeParamList { return a.tparams }
    
    // SetTypeParams sets the type parameters of the alias type a.
    // The alias a must not have type arguments.
    func (a *Alias) SetTypeParams(tparams []*TypeParam) {
    	assert(a.targs == nil)
    	a.tparams = bindTParams(tparams)
    }
    
    // TypeArgs returns the type arguments used to instantiate the Alias type.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 03:01:18 UTC 2024
    - 5K bytes
    - Viewed (0)
  6. src/go/types/alias.go

    func (a *Alias) TypeParams() *TypeParamList { return a.tparams }
    
    // SetTypeParams sets the type parameters of the alias type a.
    // The alias a must not have type arguments.
    func (a *Alias) SetTypeParams(tparams []*TypeParam) {
    	assert(a.targs == nil)
    	a.tparams = bindTParams(tparams)
    }
    
    // TypeArgs returns the type arguments used to instantiate the Alias type.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 03:01:18 UTC 2024
    - 5.1K bytes
    - Viewed (0)
  7. src/go/internal/gcimporter/iimport.go

    func (r *importReader) kind() itag {
    	return itag(r.uint64())
    }
    
    func (r *importReader) signature(recv *types.Var, rparams, tparams []*types.TypeParam) *types.Signature {
    	params := r.paramList()
    	results := r.paramList()
    	variadic := params.Len() > 0 && r.bool()
    	return types.NewSignatureType(recv, rparams, tparams, params, results, variadic)
    }
    
    func (r *importReader) tparamList() []*types.TypeParam {
    	n := r.uint64()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 19.2K bytes
    - Viewed (0)
  8. src/cmd/vendor/golang.org/x/tools/go/analysis/passes/tests/tests.go

    		fn.Type.Params == nil ||
    		len(fn.Type.Params.List) != 1 ||
    		len(fn.Type.Params.List[0].Names) > 1 {
    		return
    	}
    
    	// The param must look like a *testing.T or *testing.B.
    	if !isTestParam(fn.Type.Params.List[0].Type, prefix[:1]) {
    		return
    	}
    
    	if tparams := fn.Type.TypeParams; tparams != nil && len(tparams.List) > 0 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 03 02:38:00 UTC 2024
    - 14.4K bytes
    - Viewed (0)
  9. src/cmd/compile/internal/types2/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
    - 23.9K bytes
    - Viewed (0)
  10. src/go/types/decl.go

    		check.declare(check.scope, name, tname, scopePos)
    		tparams = append(tparams, tpar)
    	}
    
    	if check.conf._Trace && len(names) > 0 {
    		check.trace(names[0].Pos(), "type params = %v", tparams[len(tparams)-len(names):])
    	}
    
    	return tparams
    }
    
    func (check *Checker) collectMethods(obj *TypeName) {
    	// get associated methods
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 31K bytes
    - Viewed (0)
Back to top