Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 250 for elem5 (0.04 sec)

  1. src/go/types/map.go

    // A Map represents a map type.
    type Map struct {
    	key, elem Type
    }
    
    // NewMap returns a new map for the given key and element types.
    func NewMap(key, elem Type) *Map {
    	return &Map{key: key, elem: elem}
    }
    
    // Key returns the key type of map m.
    func (m *Map) Key() Type { return m.key }
    
    // Elem returns the element type of map m.
    func (m *Map) Elem() Type { return m.elem }
    
    func (t *Map) Underlying() Type { return t }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Apr 03 18:48:38 UTC 2024
    - 781 bytes
    - Viewed (0)
  2. src/go/types/chan.go

    // Dir returns the direction of channel c.
    func (c *Chan) Dir() ChanDir { return c.dir }
    
    // Elem returns the element type of channel c.
    func (c *Chan) Elem() Type { return c.elem }
    
    func (c *Chan) Underlying() Type { return c }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Apr 03 18:48:38 UTC 2024
    - 1K bytes
    - Viewed (0)
  3. src/reflect/nih_test.go

    	v := ValueOf((*nih)(nil))
    	v.Elem()
    	shouldPanic("reflect: call of reflect.Value.Field on zero Value", func() { v.Elem().Field(0) })
    
    	v = ValueOf(&global_nih)
    	if got := v.Elem().Field(1).Int(); got != 7 {
    		t.Fatalf("got %d, want 7", got)
    	}
    
    	v = ValueOf((*nih)(unsafe.Pointer(new(int))))
    	shouldPanic("reflect: reflect.Value.Elem on an invalid notinheap pointer", func() { v.Elem() })
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Aug 31 01:16:54 UTC 2022
    - 1004 bytes
    - Viewed (0)
  4. src/cmd/compile/internal/types2/array.go

    package types2
    
    // An Array represents an array type.
    type Array struct {
    	len  int64
    	elem Type
    }
    
    // NewArray returns a new array type for the given element type and length.
    // A negative length indicates an unknown length.
    func NewArray(elem Type, len int64) *Array { return &Array{len: len, elem: elem} }
    
    // Len returns the length of array a.
    // A negative result indicates an unknown length.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jul 01 22:17:50 UTC 2021
    - 803 bytes
    - Viewed (0)
  5. src/cmd/compile/internal/types2/map.go

    // A Map represents a map type.
    type Map struct {
    	key, elem Type
    }
    
    // NewMap returns a new map for the given key and element types.
    func NewMap(key, elem Type) *Map {
    	return &Map{key: key, elem: elem}
    }
    
    // Key returns the key type of map m.
    func (m *Map) Key() Type { return m.key }
    
    // Elem returns the element type of map m.
    func (m *Map) Elem() Type { return m.elem }
    
    func (t *Map) Underlying() Type { return t }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jul 01 22:17:50 UTC 2021
    - 659 bytes
    - Viewed (0)
  6. src/go/types/slice.go

    package types
    
    // A Slice represents a slice type.
    type Slice struct {
    	elem Type
    }
    
    // NewSlice returns a new slice type for the given element type.
    func NewSlice(elem Type) *Slice { return &Slice{elem: elem} }
    
    // Elem returns the element type of slice s.
    func (s *Slice) Elem() Type { return s.elem }
    
    func (s *Slice) Underlying() Type { return s }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Apr 03 18:48:38 UTC 2024
    - 701 bytes
    - Viewed (0)
  7. test/fixedbugs/bug054.go

    package main
    
    type Element interface {
    }
    
    type Vector struct {
    	elem []Element;
    }
    
    func (v *Vector) At(i int) Element {
    	return v.elem[i];
    }
    
    type TStruct struct {
    	name string;
    	fields *Vector;
    }
    
    func (s *TStruct) field(i int) *TStruct {
    	return s.fields.At(i).(*TStruct);
    }
    
    func main() {
    	v := new(Vector);
    	v.elem = make([]Element, 10);
    	t := new(TStruct);
    	t.name = "hi";
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Feb 17 04:48:57 UTC 2012
    - 669 bytes
    - Viewed (0)
  8. src/go/types/pointer.go

    type Pointer struct {
    	base Type // element type
    }
    
    // NewPointer returns a new pointer type for the given element (base) type.
    func NewPointer(elem Type) *Pointer { return &Pointer{base: elem} }
    
    // Elem returns the element type for the given pointer p.
    func (p *Pointer) Elem() Type { return p.base }
    
    func (p *Pointer) Underlying() Type { return p }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Apr 03 18:48:38 UTC 2024
    - 761 bytes
    - Viewed (0)
  9. test/typeparam/orderedmapsimp.dir/a.go

    // the receiver stops reading them.
    func Ranger[Elem any]() (*Sender[Elem], *Receiver[Elem]) {
    	c := make(chan Elem)
    	d := make(chan struct{})
    	s := &Sender[Elem]{
    		values: c,
    		done:   d,
    	}
    	r := &Receiver[Elem]{
    		values: c,
    		done:   d,
    	}
    	runtime.SetFinalizer(r, (*Receiver[Elem]).finalize)
    	return s, r
    }
    
    // A Sender is used to send values to a Receiver.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jul 28 21:40:40 UTC 2021
    - 5.5K bytes
    - Viewed (0)
  10. src/cmd/compile/internal/types2/pointer.go

    type Pointer struct {
    	base Type // element type
    }
    
    // NewPointer returns a new pointer type for the given element (base) type.
    func NewPointer(elem Type) *Pointer { return &Pointer{base: elem} }
    
    // Elem returns the element type for the given pointer p.
    func (p *Pointer) Elem() Type { return p.base }
    
    func (p *Pointer) Underlying() Type { return p }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jul 01 22:17:50 UTC 2021
    - 635 bytes
    - Viewed (0)
Back to top