Search Options

Results per page
Sort
Preferred Languages
Advance

Results 91 - 100 of 987 for typeOf (0.12 sec)

  1. staging/src/k8s.io/apimachinery/pkg/api/apitesting/roundtrip/construct.go

    }
    
    func fill(dataString string, dataInt int, t reflect.Type, v reflect.Value, fillFuncs map[reflect.Type]FillFunc, filledTypes map[reflect.Type]bool) {
    	if filledTypes[t] {
    		// we already filled this type, avoid recursing infinitely
    		return
    	}
    	filledTypes[t] = true
    	defer delete(filledTypes, t)
    
    	// if nil, populate pointers with a zero-value instance of the underlying type
    	if t.Kind() == reflect.Pointer && v.IsNil() {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Feb 27 19:12:59 UTC 2023
    - 6.5K bytes
    - Viewed (0)
  2. test/typeparam/issue48225.go

    package main
    
    import "reflect"
    
    type Foo[T any] struct {
    	val int
    }
    
    func (foo Foo[T]) Get() *T {
    	if foo.val != 1 {
    		panic("bad val field in Foo receiver")
    	}
    	return new(T)
    }
    
    var (
    	newInt    = Foo[int]{val: 1}.Get
    	newString = Foo[string]{val: 1}.Get
    )
    
    func main() {
    	i := newInt()
    	s := newString()
    
    	if t := reflect.TypeOf(i).String(); t != "*int" {
    		panic(t)
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 01 19:45:34 UTC 2022
    - 610 bytes
    - Viewed (0)
  3. pkg/scheduler/eventhandlers_test.go

    			},
    			expectStaticInformers: map[reflect.Type]bool{
    				reflect.TypeOf(&v1.Pod{}):                       true,
    				reflect.TypeOf(&v1.Node{}):                      true,
    				reflect.TypeOf(&v1.Namespace{}):                 true,
    				reflect.TypeOf(&v1.PersistentVolume{}):          true,
    				reflect.TypeOf(&storagev1.CSIStorageCapacity{}): true,
    			},
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jan 10 14:38:54 UTC 2024
    - 21.5K bytes
    - Viewed (0)
  4. test/fixedbugs/bug468.dir/p2.go

    package main
    
    import (
    	"reflect"
    
    	"./p1"
    )
    
    func main() {
    	var v1 = p1.S{1, 2}
    	var v2 = struct { X, Y int }{1, 2}
    	v1 = v2
    	t1 := reflect.TypeOf(v1)
    	t2 := reflect.TypeOf(v2)
    	if !t1.AssignableTo(t2) {
    		panic(0)
    	}
    	if !t2.AssignableTo(t1) {
    		panic(1)
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 02 13:43:18 UTC 2016
    - 422 bytes
    - Viewed (0)
  5. test/fixedbugs/issue21120.dir/b.go

    // license that can be found in the LICENSE file.
    
    package b
    
    import "reflect"
    
    type X int
    
    func F1() string {
    	type x X
    
    	s := struct {
    		*x
    	}{nil}
    	v := reflect.TypeOf(s)
    	return v.Field(0).PkgPath
    }
    
    func F2() string {
    	type y X
    
    	s := struct {
    		*y
    	}{nil}
    	v := reflect.TypeOf(s)
    	return v.Field(0).PkgPath
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jul 24 18:05:00 UTC 2017
    - 424 bytes
    - Viewed (0)
  6. test/fixedbugs/issue37716.go

    import "reflect"
    
    // complicated enough to require a compile-generated hash function
    type K struct {
    	a, b int32 // these get merged by the compiler into a single field, something typehash doesn't do
    	c    float64
    }
    
    func main() {
    	k := K{a: 1, b: 2, c: 3}
    
    	// Make a reflect map.
    	m := reflect.MakeMap(reflect.MapOf(reflect.TypeOf(K{}), reflect.TypeOf(true)))
    	m.SetMapIndex(reflect.ValueOf(k), reflect.ValueOf(true))
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 10 16:26:59 UTC 2020
    - 872 bytes
    - Viewed (0)
  7. platforms/core-configuration/declarative-dsl-core/src/test/kotlin/org/gradle/internal/declarativedsl/analysis/PropertyTest.kt

            val schema = schemaFromTypes(
                MyReceiver::class,
                listOf(MyReceiver::class),
                propertyExtractor = testPropertyContributor(expectedName, typeOf<Int>()) + testPropertyContributor(expectedName, typeOf<String>())
            )
    
            val property = schema.dataClassesByFqName[DefaultFqName.parse(MyReceiver::class.qualifiedName!!)]!!.properties.single()
            assertEquals(expectedName, property.name)
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue May 14 10:08:01 UTC 2024
    - 4.6K bytes
    - Viewed (0)
  8. staging/src/k8s.io/apimachinery/pkg/util/json/json_test.go

    			if !ok {
    				t.Fatalf("%s: decoded object missing data key: %#v", tc.In, m)
    			}
    			if !reflect.DeepEqual(tc.Data, data) {
    				t.Fatalf("%s: expected\n\t%#v (%v), got\n\t%#v (%v)", tc.In, tc.Data, reflect.TypeOf(tc.Data), data, reflect.TypeOf(data))
    			}
    
    			outputJSON, err := Marshal(m)
    			if err != nil {
    				t.Fatalf("%s: error encoding: %v", tc.In, err)
    			}
    
    			if expectedJSON != string(outputJSON) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Jul 28 08:02:09 UTC 2022
    - 9.3K bytes
    - Viewed (0)
  9. src/main/webapp/js/jquery-3.6.3.min.js

    function"!=typeof t||(n=t,t=void 0),!1===n&&(n=Te),this.each(function(){E.event.remove(this,e,n,t)})}});var ke=/<script|<style|<link/i,Ae=/checked\s*(?:[^=]|=\s*.checked.)/i,Ne=/^\s*<!\[CDATA\[|\]\]>\s*$/g;function je(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&E(e).children("tbody")[0]||e}function De(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function qe(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function...
    Registered: Wed Jun 12 13:08:18 UTC 2024
    - Last Modified: Fri Feb 17 12:13:41 UTC 2023
    - 87.8K bytes
    - Viewed (0)
  10. test/fixedbugs/bug444.go

    // The no-op conversion here used to confuse the compiler
    // into doing a load-effective-address of nil.
    // See issue 3670.
    
    package main
    
    import "reflect"
    
    type T interface {}
    
    var x bool
    
    func main() {
            reflect.TypeOf(nil)
            reflect.TypeOf(T(nil)) // used to miscompile
            shouldPanic()
    }
    
    func f() byte {
    	return []byte(nil)[0] // used to miscompile
    }
    
    func shouldPanic() {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 02 13:43:18 UTC 2016
    - 645 bytes
    - Viewed (0)
Back to top