Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for eface (0.04 sec)

  1. src/reflect/value.go

    func (v Value) Elem() Value {
    	k := v.kind()
    	switch k {
    	case Interface:
    		var eface any
    		if v.typ().NumMethod() == 0 {
    			eface = *(*any)(v.ptr)
    		} else {
    			eface = (any)(*(*interface {
    				M()
    			})(v.ptr))
    		}
    		x := unpackEface(eface)
    		if x.flag != 0 {
    			x.flag |= v.flag.ro()
    		}
    		return x
    	case Pointer:
    		ptr := v.ptr
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 21:17:41 UTC 2024
    - 119.9K bytes
    - Viewed (0)
  2. src/reflect/all_test.go

    			if _, ok := rv.Interface().(Iface); ok != table.impl {
    				if table.impl {
    					t.Errorf("test-%d-%d: type=%v fails to implement Iface.\n", i, j, table.typ)
    				} else {
    					t.Errorf("test-%d-%d: type=%v should NOT implement Iface\n", i, j, table.typ)
    				}
    				continue
    			}
    
    			if !table.impl {
    				continue
    			}
    
    			v := rv.Interface().(Iface).Get()
    			if v != want {
    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