Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 22 for NumIn (0.17 sec)

  1. src/go/internal/gccgoimporter/importer_test.go

    	{pkgpath: "nointerface", name: "I", want:...
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Nov 15 20:17:57 UTC 2022
    - 7.2K bytes
    - Viewed (0)
  2. src/net/rpc/server.go

    		// Method must be exported.
    		if !method.IsExported() {
    			continue
    		}
    		// Method needs three ins: receiver, *args, *reply.
    		if mtype.NumIn() != 3 {
    			if logErr {
    				log.Printf("rpc.Register: method %q has %d input parameters; needs exactly three\n", mname, mtype.NumIn())
    			}
    			continue
    		}
    		// First arg need not be a pointer.
    		argType := mtype.In(1)
    		if !isExportedOrBuiltinType(argType) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jan 10 03:29:50 UTC 2024
    - 21.6K bytes
    - Viewed (0)
  3. src/math/rand/regress_test.go

    		mv := rv.Method(i)
    		mt := mv.Type()
    		if mt.NumOut() == 0 {
    			continue
    		}
    		r.Seed(0)
    		for repeat := 0; repeat < 20; repeat++ {
    			var args []reflect.Value
    			var argstr string
    			if mt.NumIn() == 1 {
    				var x any
    				switch mt.In(0).Kind() {
    				default:
    					t.Fatalf("unexpected argument type for r.%s", m.Name)
    
    				case reflect.Int:
    					if m.Name == "Perm" {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Dec 13 18:45:54 UTC 2021
    - 17.8K bytes
    - Viewed (0)
  4. src/math/rand/v2/regress_test.go

    		m := rv.Type().Method(i)
    		mv := rv.Method(i)
    		mt := mv.Type()
    		if mt.NumOut() == 0 {
    			continue
    		}
    		for repeat := 0; repeat < 20; repeat++ {
    			var args []reflect.Value
    			var argstr string
    			if mt.NumIn() == 1 {
    				var x any
    				switch mt.In(0).Kind() {
    				default:
    					t.Fatalf("unexpected argument type for r.%s", m.Name)
    
    				case reflect.Int:
    					if m.Name == "Perm" {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 07 18:03:11 UTC 2024
    - 20.3K bytes
    - Viewed (0)
  5. src/testing/fuzz.go

    	// ff should be in the form func(*testing.T, ...interface{})
    	fn := reflect.ValueOf(ff)
    	fnType := fn.Type()
    	if fnType.Kind() != reflect.Func {
    		panic("testing: F.Fuzz must receive a function")
    	}
    	if fnType.NumIn() < 2 || fnType.In(0) != reflect.TypeOf((*T)(nil)) {
    		panic("testing: fuzz target must receive at least two arguments, where the first argument is a *T")
    	}
    	if fnType.NumOut() != 0 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 26 22:55:25 UTC 2024
    - 22.9K bytes
    - Viewed (0)
  6. staging/src/k8s.io/apimachinery/third_party/forked/golang/reflect/deep_equal.go

    func (e Equalities) AddFunc(eqFunc interface{}) error {
    	fv := reflect.ValueOf(eqFunc)
    	ft := fv.Type()
    	if ft.Kind() != reflect.Func {
    		return fmt.Errorf("expected func, got: %v", ft)
    	}
    	if ft.NumIn() != 2 {
    		return fmt.Errorf("expected two 'in' params, got: %v", ft)
    	}
    	if ft.NumOut() != 1 {
    		return fmt.Errorf("expected one 'out' param, got: %v", ft)
    	}
    	if ft.In(0) != ft.In(1) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jul 20 17:18:42 UTC 2022
    - 10.8K bytes
    - Viewed (0)
  7. staging/src/k8s.io/apimachinery/pkg/runtime/scheme.go

    		}
    	}
    	s.typeToGVK[t] = append(s.typeToGVK[t], gvk)
    
    	// if the type implements DeepCopyInto(<obj>), register a self-conversion
    	if m := reflect.ValueOf(obj).MethodByName("DeepCopyInto"); m.IsValid() && m.Type().NumIn() == 1 && m.Type().NumOut() == 0 && m.Type().In(0) == reflect.TypeOf(obj) {
    		if err := s.AddGeneratedConversionFunc(obj, obj, func(a, b interface{}, scope conversion.Scope) error {
    			// copy a to b
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sun Dec 18 04:27:38 UTC 2022
    - 25.2K bytes
    - Viewed (0)
  8. src/cmd/compile/internal/ir/fmt.go

    	nm := t.NumMethod()
    	for i := 0; i < nm; i++ {
    		tm := t.Method(i)
    		if tm.PkgPath != "" {
    			// skip unexported method - call will fail
    			continue
    		}
    		m := v.Method(i)
    		mt := m.Type()
    		if mt.NumIn() == 0 && mt.NumOut() == 1 && mt.Out(0).Kind() == reflect.Bool {
    			// TODO(rsc): Remove the func/defer/recover wrapping,
    			// which is guarding against panics in miniExpr,
    			// once we get down to the simpler state in which
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 05 15:20:28 UTC 2023
    - 26K bytes
    - Viewed (0)
  9. src/internal/abi/type.go

    type FuncType struct {
    	Type
    	InCount  uint16
    	OutCount uint16 // top bit is set if last input parameter is ...
    }
    
    func (t *FuncType) In(i int) *Type {
    	return t.InSlice()[i]
    }
    
    func (t *FuncType) NumIn() int {
    	return int(t.InCount)
    }
    
    func (t *FuncType) NumOut() int {
    	return int(t.OutCount & (1<<15 - 1))
    }
    
    func (t *FuncType) Out(i int) *Type {
    	return (t.OutSlice()[i])
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Apr 17 21:09:59 UTC 2024
    - 21.8K bytes
    - Viewed (0)
  10. src/reflect/all_test.go

    	typ := TypeOf(f)
    	if typ.NumIn() == 2 && typ.In(0) == TypeOf(int(0)) {
    		sl := typ.In(1)
    		if sl.Kind() == Slice {
    			if sl.Elem() == TypeOf(0.0) {
    				// ok
    				return
    			}
    		}
    	}
    
    	// Failed
    	t.Errorf("want NumIn() = 2, In(0) = int, In(1) = []float64")
    	s := fmt.Sprintf("have NumIn() = %d", typ.NumIn())
    	for i := 0; i < typ.NumIn(); i++ {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 218.8K bytes
    - Viewed (0)
Back to top