Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 12 of 12 for CanAddr (0.17 sec)

  1. src/encoding/json/decode.go

    	haveAddr := false
    
    	// If v is a named type and is addressable,
    	// start with its address, so that if the type has pointer methods,
    	// we find them.
    	if v.Kind() != reflect.Pointer && v.Type().Name() != "" && v.CanAddr() {
    		haveAddr = true
    		v = v.Addr()
    	}
    	for {
    		// Load value from interface, but only if the result will be
    		// usefully addressable.
    		if v.Kind() == reflect.Interface && !v.IsNil() {
    			e := v.Elem()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 00:18:55 UTC 2024
    - 35.3K bytes
    - Viewed (0)
  2. src/reflect/all_test.go

    			e0[j] = ValueOf(e)
    		}
    		// Convert extra from []int to *SliceValue.
    		e1 := ValueOf(test.extra)
    
    		// Test Append.
    		a0 := ValueOf(&test.orig).Elem()
    		have0 := Append(a0, e0...)
    		if have0.CanAddr() {
    			t.Errorf("Append #%d: have slice should not be addressable", i)
    		}
    		if !DeepEqual(have0.Interface(), want) {
    			t.Errorf("Append #%d: have %v, want %v (%p %p)", i, have0, want, test.orig, have0.Interface())
    		}
    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