Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 223 for recvs (0.07 sec)

  1. test/typeparam/issue47901.go

    // license that can be found in the LICENSE file.
    
    package main
    
    type Chan[T any] chan Chan[T]
    
    func (ch Chan[T]) recv() Chan[T] {
    	return <-ch
    }
    
    func main() {
    	ch := Chan[int](make(chan Chan[int]))
    	go func() {
    		ch <- make(Chan[int])
    	}()
    	ch.recv()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 01 19:45:34 UTC 2022
    - 372 bytes
    - Viewed (0)
  2. src/go/types/subst.go

    		// In this case, the type of f is an interface that is itself the receiver
    		// type of all of its methods. Because we have no type name to break
    		// cycles, substituting in the recv results in an infinite loop of
    		// recv->interface->recv->interface->...
    		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,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 03:04:07 UTC 2024
    - 11.1K bytes
    - Viewed (0)
  3. src/cmd/vendor/golang.org/x/tools/go/analysis/passes/timeformat/timeformat.go

    func isTimeDotFormat(f *types.Func) bool {
    	if f.Name() != "Format" || f.Pkg() == nil || f.Pkg().Path() != "time" {
    		return false
    	}
    	// Verify that the receiver is time.Time.
    	recv := f.Type().(*types.Signature).Recv()
    	return recv != nil && analysisutil.IsNamedType(recv.Type(), "time", "Time")
    }
    
    func isTimeDotParse(f *types.Func) bool {
    	return analysisutil.IsFunctionNamed(f, "time", "Parse")
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 02:20:05 UTC 2024
    - 3.3K bytes
    - Viewed (0)
  4. src/go/internal/srcimporter/srcimporter_test.go

    	for i := 0; i < iface.NumExplicitMethods(); i++ {
    		m := iface.ExplicitMethod(i)
    		recv := m.Type().(*types.Signature).Recv()
    		if recv == nil {
    			t.Errorf("%s: missing receiver type", m)
    			continue
    		}
    		if recv.Type() != named {
    			t.Errorf("%s: got recv type %s; want %s", m, recv.Type(), named)
    		}
    	}
    
    	// check embedded interfaces (they are named, too)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 12 12:00:02 UTC 2023
    - 6.5K bytes
    - Viewed (0)
  5. test/chan/select5.go

    }
    `
    
    func parse(name, s string) *template.Template {
    	t, err := template.New(name).Parse(s)
    	if err != nil {
    		panic(fmt.Sprintf("%q: %s", name, err))
    	}
    	return t
    }
    
    var recv = parse("recv", `
    	{{/*  Send n, receive it one way or another into x, check that they match. */}}
    	c <- n
    	{{if .Maybe}}
    	x = <-c
    	{{else}}
    	select {
    	{{/*  Blocking or non-blocking, before the receive. */}}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 02 13:43:18 UTC 2016
    - 10K bytes
    - Viewed (0)
  6. test/escape_reflect.go

    	mv := reflect.ValueOf(m)
    	it.Reset(mv)
    }
    
    func recv1(ch chan string) string { // ERROR "ch does not escape"
    	v := reflect.ValueOf(ch)
    	r, _ := v.Recv()
    	return r.String()
    }
    
    func recv2(ch chan string) string { // ERROR "ch does not escape"
    	v := reflect.ValueOf(ch)
    	r, _ := v.TryRecv()
    	return r.String()
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Sep 08 18:50:24 UTC 2023
    - 13.1K bytes
    - Viewed (0)
  7. internal/s3select/sql/jsonpath_test.go

    			if err != nil {
    				t.Fatalf("parse failed!: %d %v %s", i, err, tc)
    			}
    
    			// Read only the first json object from the file
    			recs, err := getJSONStructs(b)
    			if err != nil || len(recs) != 3 {
    				t.Fatalf("%v or length was not 3", err)
    			}
    
    			for j, rec := range recs {
    				// fmt.Println(rec)
    				r, _, err := jsonpathEval(jp.PathExpr, rec)
    				if err != nil {
    					t.Errorf("Error: %d %d %v", i, j, err)
    				}
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Mon Sep 19 18:05:16 UTC 2022
    - 2.8K bytes
    - Viewed (0)
  8. src/go/doc/reader.go

    	}
    	// function doesn't exist or has no documentation; use f
    	recv := ""
    	if f.Recv != nil {
    		var typ ast.Expr
    		// be careful in case of incorrect ASTs
    		if list := f.Recv.List; len(list) == 1 {
    			typ = list[0].Type
    		}
    		recv = recvString(typ)
    	}
    	mset[name] = &Func{
    		Doc:  f.Doc.Text(),
    		Name: name,
    		Decl: f,
    		Recv: recv,
    		Orig: recv,
    	}
    	if !preserveAST {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 27.5K bytes
    - Viewed (0)
  9. src/go/doc/doc.go

    //
    // If recv == "", HasSym reports whether the package has a top-level
    // const, func, type, or var named name.
    //
    // If recv != "", HasSym reports whether the package has a type
    // named recv with a method named name.
    func (p *Package) lookupSym(recv, name string) bool {
    	if recv != "" {
    		return p.syms[recv+"."+name]
    	}
    	return p.syms[name]
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 12:02:03 UTC 2023
    - 11.2K bytes
    - Viewed (0)
  10. src/go/doc/comment/print.go

    			baseURL += "/"
    		}
    		switch {
    		case l.Name == "":
    			return baseURL + l.ImportPath + slash
    		case l.Recv != "":
    			return baseURL + l.ImportPath + slash + "#" + l.Recv + "." + l.Name
    		default:
    			return baseURL + l.ImportPath + slash + "#" + l.Name
    		}
    	}
    	if l.Recv != "" {
    		return "#" + l.Recv + "." + l.Name
    	}
    	return "#" + l.Name
    }
    
    // DefaultID returns the default anchor ID for the heading h.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 12:02:03 UTC 2023
    - 7.6K bytes
    - Viewed (0)
Back to top