Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 193 for recvq (0.06 sec)

  1. src/cmd/compile/internal/types/type.go

    // parameters, and results, any of which may be nil.
    func NewSignature(recv *Field, params, results []*Field) *Type {
    	startParams := 0
    	if recv != nil {
    		startParams = 1
    	}
    	startResults := startParams + len(params)
    
    	allParams := make([]*Field, startResults+len(results))
    	if recv != nil {
    		allParams[0] = recv
    	}
    	copy(allParams[startParams:], params)
    	copy(allParams[startResults:], results)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 04 14:29:45 UTC 2024
    - 49.5K bytes
    - Viewed (0)
  2. src/cmd/compile/internal/types2/signature.go

    				}
    				if cause != "" {
    					check.errorf(recv, InvalidRecv, "invalid receiver type %s (%s)", rtyp, cause)
    				}
    			case *Basic:
    				check.errorf(recv, InvalidRecv, "cannot define new methods on non-local type %s", rtyp)
    			default:
    				check.errorf(recv, InvalidRecv, "invalid receiver type %s", recv.typ)
    			}
    		}).describef(recv, "validate receiver %s", recv)
    	}
    
    	sig.params = NewTuple(params...)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 15 21:33:05 UTC 2024
    - 12.6K bytes
    - Viewed (0)
  3. src/cmd/vendor/golang.org/x/tools/internal/stdlib/stdlib.go

    //
    // Example: "(*Buffer).Grow" -> (true, "Buffer", "Grow")
    func (sym *Symbol) SplitMethod() (ptr bool, recv, name string) {
    	if sym.Kind != Method {
    		panic("not a method")
    	}
    	recv, name, _ = strings.Cut(sym.Name, ".")
    	recv = recv[len("(") : len(recv)-len(")")]
    	ptr = recv[0] == '*'
    	if ptr {
    		recv = recv[len("*"):]
    	}
    	return
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 02:20:05 UTC 2024
    - 2.4K bytes
    - Viewed (0)
  4. src/cmd/compile/internal/types2/selection.go

    func (s *Selection) Type() Type {
    	switch s.kind {
    	case MethodVal:
    		// The type of x.f is a method with its receiver type set
    		// to the type of x.
    		sig := *s.obj.(*Func).typ.(*Signature)
    		recv := *sig.recv
    		recv.typ = s.recv
    		sig.recv = &recv
    		return &sig
    
    	case MethodExpr:
    		// The type of x.f is a function (without receiver)
    		// and an additional first argument with the same type as x.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Feb 22 19:32:17 UTC 2024
    - 5.8K bytes
    - Viewed (0)
  5. src/go/types/selection.go

    func (s *Selection) Type() Type {
    	switch s.kind {
    	case MethodVal:
    		// The type of x.f is a method with its receiver type set
    		// to the type of x.
    		sig := *s.obj.(*Func).typ.(*Signature)
    		recv := *sig.recv
    		recv.typ = s.recv
    		sig.recv = &recv
    		return &sig
    
    	case MethodExpr:
    		// The type of x.f is a function (without receiver)
    		// and an additional first argument with the same type as x.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Apr 03 18:48:38 UTC 2024
    - 5.9K bytes
    - Viewed (0)
  6. src/cmd/compile/internal/typecheck/dcl.go

    func NewMethodType(sig *types.Type, recv *types.Type) *types.Type {
    	nrecvs := 0
    	if recv != nil {
    		nrecvs++
    	}
    
    	// TODO(mdempsky): Move this function to types.
    	// TODO(mdempsky): Preserve positions, names, and package from sig+recv.
    
    	params := make([]*types.Field, nrecvs+sig.NumParams())
    	if recv != nil {
    		params[0] = types.NewField(base.Pos, nil, recv)
    	}
    	for i, param := range sig.Params() {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Sep 14 13:15:50 UTC 2023
    - 3.1K bytes
    - Viewed (0)
  7. cmd/bucket-handlers_test.go

    		// Call the ServeHTTP to execute the handler.
    		apiRouter.ServeHTTP(recV2, reqV2)
    		if recV2.Code != testCase.expectedRespStatus {
    			t.Errorf("Test %d: %s: Expected the response status to be `%d`, but instead found `%d`", i+1, instanceType, testCase.expectedRespStatus, recV2.Code)
    		}
    
    		errorResponse = APIErrorResponse{}
    		err = xml.Unmarshal(recV2.Body.Bytes(), &errorResponse)
    		if err != nil && !testCase.shouldPass {
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Mon Jun 10 15:50:49 UTC 2024
    - 39.8K bytes
    - Viewed (0)
  8. src/cmd/vendor/golang.org/x/tools/go/analysis/passes/unmarshal/unmarshal.go

    		argidx := -1
    
    		recv := fn.Type().(*types.Signature).Recv()
    		if fn.Name() == "Unmarshal" && recv == nil {
    			// "encoding/json".Unmarshal
    			// "encoding/xml".Unmarshal
    			// "encoding/asn1".Unmarshal
    			switch fn.Pkg().Path() {
    			case "encoding/json", "encoding/xml", "encoding/asn1":
    				argidx = 1 // func([]byte, interface{})
    			}
    		} else if fn.Name() == "Decode" && recv != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 02:20:05 UTC 2024
    - 3.1K bytes
    - Viewed (0)
  9. cmd/object-handlers_test.go

    		// Call the ServeHTTP to execute the handler.
    		apiRouter.ServeHTTP(recV2, reqV2)
    		if recV2.Code != testCase.expectedRespStatus {
    			t.Errorf("Test %d: %s: Expected the response status to be `%d`, but instead found `%d`", i+1, instanceType, testCase.expectedRespStatus, recV2.Code)
    		}
    
    		// read the response body.
    		actualContent, err = io.ReadAll(recV2.Body)
    		if err != nil {
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Mon Jun 10 15:50:49 UTC 2024
    - 161.9K bytes
    - Viewed (0)
  10. src/cmd/vendor/golang.org/x/tools/go/types/typeutil/callee.go

    	if f, ok := Callee(info, call).(*types.Func); ok && !interfaceMethod(f) {
    		return f
    	}
    	return nil
    }
    
    func interfaceMethod(f *types.Func) bool {
    	recv := f.Type().(*types.Signature).Recv()
    	return recv != nil && types.IsInterface(recv.Type())
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Dec 18 21:28:13 UTC 2023
    - 2.1K bytes
    - Viewed (0)
Back to top