Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for directlyAssignable (0.37 sec)

  1. src/internal/reflectlite/type.go

    			}
    		}
    	}
    	return false
    }
    
    // directlyAssignable reports whether a value x of type V can be directly
    // assigned (using memmove) to a value of type T.
    // https://golang.org/doc/go_spec.html#Assignability
    // Ignoring the interface rules (implemented elsewhere)
    // and the ideal constant rules (no ideal constants at run time).
    func directlyAssignable(T, V *abi.Type) bool {
    	// x's type V is identical to T?
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 07 17:01:54 UTC 2024
    - 16.2K bytes
    - Viewed (0)
  2. src/internal/reflectlite/value.go

    func (v Value) assignTo(context string, dst *abi.Type, target unsafe.Pointer) Value {
    	// if v.flag&flagMethod != 0 {
    	// 	v = makeMethodValue(context, v)
    	// }
    
    	switch {
    	case directlyAssignable(dst, v.typ()):
    		// Overwrite type so that they match.
    		// Same memory layout, so no harm done.
    		fl := v.flag&(flagAddr|flagIndir) | v.flag.ro()
    		fl |= flag(dst.Kind())
    		return Value{dst, v.ptr, fl}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 07 17:01:54 UTC 2024
    - 13.6K bytes
    - Viewed (0)
  3. src/reflect/type.go

    }
    
    // directlyAssignable reports whether a value x of type V can be directly
    // assigned (using memmove) to a value of type T.
    // https://golang.org/doc/go_spec.html#Assignability
    // Ignoring the interface rules (implemented elsewhere)
    // and the ideal constant rules (no ideal constants at run time).
    func directlyAssignable(T, V *abi.Type) bool {
    	// x's type V is identical to T?
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 17:58:53 UTC 2024
    - 85.5K bytes
    - Viewed (0)
  4. src/reflect/value.go

    func (v Value) assignTo(context string, dst *abi.Type, target unsafe.Pointer) Value {
    	if v.flag&flagMethod != 0 {
    		v = makeMethodValue(context, v)
    	}
    
    	switch {
    	case directlyAssignable(dst, v.typ()):
    		// Overwrite type so that they match.
    		// Same memory layout, so no harm done.
    		fl := v.flag&(flagAddr|flagIndir) | v.flag.ro()
    		fl |= flag(dst.Kind())
    		return Value{dst, v.ptr, fl}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 21:17:41 UTC 2024
    - 119.9K bytes
    - Viewed (0)
Back to top