Search Options

Results per page
Sort
Preferred Languages
Advance

Results 151 - 160 of 3,055 for REFLECT (0.13 sec)

  1. src/cmd/vendor/golang.org/x/tools/go/analysis/passes/unsafeptr/unsafeptr.go

    	// https://golang.org/pkg/unsafe/#Pointer.
    
    	switch x := astutil.Unparen(x).(type) {
    	case *ast.SelectorExpr:
    		// "(6) Conversion of a reflect.SliceHeader or
    		// reflect.StringHeader Data field to or from Pointer."
    		if x.Sel.Name != "Data" {
    			break
    		}
    		// reflect.SliceHeader and reflect.StringHeader are okay,
    		// but only if they are pointing at a real slice or string.
    		// It's not okay to do:
    		//	var x SliceHeader
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 02:20:05 UTC 2024
    - 4.7K bytes
    - Viewed (0)
  2. test/fixedbugs/bug461.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    // part two of issue 4124. Make sure reflect doesn't mark the field as exported.
    
    package main
    
    import "reflect"
    
    var T struct {
    	int
    }
    
    func main() {
    	v := reflect.ValueOf(&T)
    	v = v.Elem().Field(0)
    	if v.CanSet() {
    		panic("int should be unexported")
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 02 13:43:18 UTC 2016
    - 426 bytes
    - Viewed (0)
  3. test/fixedbugs/issue16616.dir/issue16616.go

    // license that can be found in the LICENSE file.
    
    package main
    
    import (
    	"reflect"
    
    	_ "./a"
    	"./b"
    )
    
    var V struct{ i int }
    
    func main() {
    	if got := reflect.ValueOf(b.V).Type().Field(0).PkgPath; got != "b" {
    		panic(`PkgPath=` + got + ` for first field of b.V, want "b"`)
    	}
    	if got := reflect.ValueOf(V).Type().Field(0).PkgPath; got != "main" {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Aug 26 11:46:15 UTC 2016
    - 666 bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/reflect/TypeVisitorTest.java

     * limitations under the License.
     */
    
    package com.google.common.reflect;
    
    import java.lang.reflect.GenericArrayType;
    import java.lang.reflect.ParameterizedType;
    import java.lang.reflect.Type;
    import java.lang.reflect.TypeVariable;
    import java.lang.reflect.WildcardType;
    import java.util.ArrayList;
    import java.util.EnumSet;
    import junit.framework.TestCase;
    
    /**
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Mon Dec 04 17:37:03 UTC 2017
    - 3.7K bytes
    - Viewed (0)
  5. test/fixedbugs/issue65957.dir/main.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package main
    
    import (
    	"./a"
    	"reflect"
    )
    
    var s = []rune{0, 1, 2, 3}
    
    func main() {
    	m := map[any]int{}
    	k := reflect.New(reflect.ArrayOf(4, reflect.TypeOf(int32(0)))).Elem().Interface()
    	m[k] = 1
    	a.F()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Feb 28 05:32:14 UTC 2024
    - 368 bytes
    - Viewed (0)
  6. src/runtime/stkframe.go

    	f := frame.fn
    	if f.args != abi.ArgsSizeUnknown {
    		argMap.n = f.args / goarch.PtrSize
    		return
    	}
    	// Extract argument bitmaps for reflect stubs from the calls they made to reflect.
    	switch funcname(f) {
    	case "reflect.makeFuncStub", "reflect.methodValueCall":
    		// These take a *reflect.methodValue as their
    		// context register and immediately save it to 0(SP).
    		// Get the methodValue from 0(SP).
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 15:10:48 UTC 2024
    - 9.9K bytes
    - Viewed (0)
  7. test/fixedbugs/issue27695.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    // Make sure return values are always scanned, when
    // calling methods (+functions, TODO) with reflect.
    
    package main
    
    import (
    	"reflect"
    	"runtime/debug"
    	"sync"
    )
    
    func main() {
    	debug.SetGCPercent(1) // run GC frequently
    	var wg sync.WaitGroup
    	for i := 0; i < 20; i++ {
    		wg.Add(1)
    		go func() {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat Sep 29 20:25:24 UTC 2018
    - 1.2K bytes
    - Viewed (0)
  8. pkg/kubelet/pod/testing/mock_manager.go

    //
    //	mockgen -source=pod_manager.go -destination=testing/mock_manager.go -package=testing Manager
    //
    
    // Package testing is a generated GoMock package.
    package testing
    
    import (
    	reflect "reflect"
    
    	gomock "go.uber.org/mock/gomock"
    	v1 "k8s.io/api/core/v1"
    	types "k8s.io/apimachinery/pkg/types"
    	types0 "k8s.io/kubernetes/pkg/kubelet/types"
    )
    
    // MockManager is a mock of Manager interface.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Mar 07 08:12:16 UTC 2024
    - 8.8K bytes
    - Viewed (0)
  9. staging/src/k8s.io/apimachinery/pkg/conversion/converter.go

    limitations under the License.
    */
    
    package conversion
    
    import (
    	"fmt"
    	"reflect"
    )
    
    type typePair struct {
    	source reflect.Type
    	dest   reflect.Type
    }
    
    type NameFunc func(t reflect.Type) string
    
    var DefaultNameFunc = func(t reflect.Type) string { return t.Name() }
    
    // ConversionFunc converts the object a into the object b, reusing arrays or objects
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Jun 25 16:23:43 UTC 2022
    - 7.4K bytes
    - Viewed (0)
  10. schema/constraint_test.go

    		}
    
    		for _, name := range []string{"Name", "Constraint"} {
    			if reflect.ValueOf(result).FieldByName(name).Interface() != reflect.ValueOf(v).FieldByName(name).Interface() {
    				t.Errorf(
    					"check %v %v should equal, expects %v, got %v",
    					k, name, reflect.ValueOf(result).FieldByName(name).Interface(), reflect.ValueOf(v).FieldByName(name).Interface(),
    				)
    			}
    		}
    	}
    }
    
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Sun Feb 04 07:49:19 UTC 2024
    - 2.2K bytes
    - Viewed (0)
Back to top