Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 343 for Map (0.11 sec)

  1. src/reflect/type_test.go

    		{"struct{}", args{reflect.TypeOf(struct{}{})}, true},
    		{"struct{i int; s S}", args{reflect.TypeOf(struct {
    			i int
    			s S
    		}{})}, true},
    		{"map[int][int]", args{reflect.TypeOf(map[int]int{})}, false},
    		{"[4]chan int", args{reflect.TypeOf([4]chan int{})}, true},
    		{"[0]struct{_ S}", args{reflect.TypeOf([0]struct {
    			_ S
    		}{})}, true},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 15 23:39:44 UTC 2024
    - 4.2K bytes
    - Viewed (0)
  2. src/internal/concurrent/hashtriemap_test.go

    	})
    }
    
    func testAll[K, V comparable](t *testing.T, m *HashTrieMap[K, V], testData map[K]V, yield func(K, V) bool) {
    	for k, v := range testData {
    		expectStored(t, k, v)(m.LoadOrStore(k, v))
    	}
    	visited := make(map[K]int)
    	m.All()(func(key K, got V) bool {
    		want, ok := testData[key]
    		if !ok {
    			t.Errorf("unexpected key %v in map", key)
    			return false
    		}
    		if got != want {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 16:01:55 UTC 2024
    - 9.3K bytes
    - Viewed (0)
  3. src/internal/reflectlite/reflect_mirror_test.go

    	"uncommonType",
    	"arrayType",
    	"chanType",
    	"funcType",
    	"interfaceType",
    	"ptrType",
    	"sliceType",
    	"structType",
    }
    
    type visitor struct {
    	m map[string]map[string]bool
    }
    
    func newVisitor() visitor {
    	v := visitor{}
    	v.m = make(map[string]map[string]bool)
    
    	return v
    }
    func (v visitor) filter(name string) bool {
    	for _, typeName := range typeNames {
    		if typeName == name {
    			return true
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 19 21:11:15 UTC 2024
    - 2.8K bytes
    - Viewed (0)
  4. src/runtime/traceexp.go

    	// Experimental events for ExperimentAllocFree.
    
    	// Experimental heap span events. IDs map reversibly to base addresses.
    	traceEvSpan      // heap span exists [timestamp, id, npages, type/class]
    	traceEvSpanAlloc // heap span alloc [timestamp, id, npages, type/class]
    	traceEvSpanFree  // heap span free [timestamp, id]
    
    	// Experimental heap object events. IDs map reversibly to addresses.
    	traceEvHeapObject      // heap object exists [timestamp, id, type]
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 08 17:47:01 UTC 2024
    - 2.4K bytes
    - Viewed (0)
  5. test/live2.go

    package main
    
    // issue 8142: lost 'addrtaken' bit on inlined variables.
    
    func printnl()
    
    //go:noescape
    func useT40(*T40)
    
    type T40 struct {
    	m map[int]int
    }
    
    func newT40() *T40 {
    	ret := T40{}
    	ret.m = make(map[int]int, 42) // ERROR "live at call to makemap: &ret$"
    	return &ret
    }
    
    func bad40() {
    	t := newT40() // ERROR "stack object ret T40$" "stack object .autotmp_[0-9]+ runtime.hmap$"
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Aug 21 23:29:33 UTC 2023
    - 953 bytes
    - Viewed (0)
  6. src/cmd/compile/internal/types2/format.go

    	// Qualify the package unless it's the package being type-checked.
    	if pkg != check.pkg {
    		if check.pkgPathMap == nil {
    			check.pkgPathMap = make(map[string]map[string]bool)
    			check.seenPkgMap = make(map[*Package]bool)
    			check.markImports(check.pkg)
    		}
    		// If the same package name was used by multiple packages, display the full path.
    		if len(check.pkgPathMap[pkg.name]) > 1 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 3.5K bytes
    - Viewed (0)
  7. src/archive/zip/register.go

    	defer r.mu.Unlock()
    	var err error
    	if r.fr != nil {
    		err = r.fr.Close()
    		flateReaderPool.Put(r.fr)
    		r.fr = nil
    	}
    	return err
    }
    
    var (
    	compressors   sync.Map // map[uint16]Compressor
    	decompressors sync.Map // map[uint16]Decompressor
    )
    
    func init() {
    	compressors.Store(Store, Compressor(func(w io.Writer) (io.WriteCloser, error) { return &nopCloser{w}, nil }))
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Oct 13 18:36:46 UTC 2023
    - 3.7K bytes
    - Viewed (0)
  8. src/reflect/export_test.go

    func MapBucketOf(x, y Type) Type {
    	return toType(bucketOf(x.common(), y.common()))
    }
    
    func CachedBucketOf(m Type) Type {
    	t := m.(*rtype)
    	if Kind(t.t.Kind_&abi.KindMask) != Map {
    		panic("not map")
    	}
    	tt := (*mapType)(unsafe.Pointer(t))
    	return toType(tt.Bucket)
    }
    
    type EmbedWithUnexpMeth struct{}
    
    func (EmbedWithUnexpMeth) f() {}
    
    type pinUnexpMeth interface {
    	f()
    }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 15:10:48 UTC 2024
    - 3.8K bytes
    - Viewed (0)
  9. src/internal/types/testdata/fixedbugs/issue61879.go

    		args: args,
    	}
    }
    
    func (k *ImplA[T]) setData(data string) InterfaceA[T] {
    	k.data = data
    	return k
    }
    
    func Foo[M ~map[InterfaceA[T]]V, T comparable, V any](m M) {
    	// DO SOMETHING HERE
    	return
    }
    
    func Bar() {
    	keys := make([]InterfaceA[int], 0, 10)
    	m := make(map[InterfaceA[int]]int)
    	for i := 0; i < 10; i++ {
    		keys = append(keys, NewInterfaceA[int](i))
    		m[keys[i]] = i
    	}
    
    	Foo(m) // panic here
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Aug 15 19:42:56 UTC 2023
    - 1K bytes
    - Viewed (0)
  10. test/fixedbugs/issue66096.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package p
    
    type Message struct {
    	Header map[string][]string
    }
    
    func f() {
    	m := Message{Header: map[string][]string{}}
    	m.Header[""] = append([]string(m.Header[""]), "")
    	_ = m
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 08 02:00:33 UTC 2024
    - 352 bytes
    - Viewed (0)
Back to top