Search Options

Results per page
Sort
Preferred Languages
Advance

Results 111 - 120 of 638 for Map (0.09 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. test/typeparam/issue48537.go

    // Copyright 2021 The Go Authors. All rights reserved.
    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package main
    
    func main() {
    }
    
    type C interface {
    	map[int]string
    }
    
    func f[A C]() A {
    	return A{
    		1: "a",
    		2: "b",
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 01 19:45:34 UTC 2022
    - 295 bytes
    - Viewed (0)
  3. src/internal/coverage/rtcov/rtcov.go

    		CounterMode:        cmode,
    		CounterGranularity: cgran,
    	})
    	if pkgid != -1 {
    		if Meta.PkgMap == nil {
    			Meta.PkgMap = make(map[int]int)
    		}
    		if _, ok := Meta.PkgMap[pkgid]; ok {
    			return 0
    		}
    		// Record the real slot (position on meta-list) for this
    		// package; we'll use the map to fix things up later on.
    		Meta.PkgMap[pkgid] = slot
    	}
    
    	// ID zero is reserved as invalid.
    	return uint32(slot + 1)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 09:57:47 UTC 2024
    - 3.1K bytes
    - Viewed (0)
  4. src/net/rpc/jsonrpc/client.go

    	mutex   sync.Mutex        // protects pending
    	pending map[uint64]string // map request id to method name
    }
    
    // NewClientCodec returns a new [rpc.ClientCodec] using JSON-RPC on conn.
    func NewClientCodec(conn io.ReadWriteCloser) rpc.ClientCodec {
    	return &clientCodec{
    		dec:     json.NewDecoder(conn),
    		enc:     json.NewEncoder(conn),
    		c:       conn,
    		pending: make(map[uint64]string),
    	}
    }
    
    type clientRequest struct {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jan 10 03:29:50 UTC 2024
    - 3K bytes
    - Viewed (0)
  5. 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)
  6. test/fixedbugs/issue52535.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    // gofrontend crashed converting unnamed bool type to any.
    
    package p
    
    func F() {
    	m := make(map[int]int)
    	var ok any
    	_, ok = m[0]
    	_ = ok
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 06 17:37:12 UTC 2022
    - 314 bytes
    - Viewed (0)
  7. src/go/parser/resolver_test.go

    // '=@bar'. It returns a map of name->position for declarations, and
    // name->position(s) for uses.
    func positionMarkers(handle *token.File, src []byte) (decls map[string]token.Pos, uses map[string][]token.Pos) {
    	var s scanner.Scanner
    	s.Init(handle, src, nil, scanner.ScanComments)
    	decls = make(map[string]token.Pos)
    	uses = make(map[string][]token.Pos)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Aug 19 17:46:07 UTC 2022
    - 4.9K bytes
    - Viewed (0)
  8. test/typeparam/issue48962.dir/a.go

    // license that can be found in the LICENSE file.
    
    package a
    
    type (
    	A[P any]               [10]P
    	S[P any]               struct{ f P }
    	P[P any]               *P
    	M[K comparable, V any] map[K]V
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jan 24 21:27:28 UTC 2022
    - 307 bytes
    - Viewed (0)
  9. 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)
  10. test/typeparam/issue46591.go

    // run
    
    // Copyright 2021 The Go Authors. All rights reserved.
    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package main
    
    type T[_ any] struct{}
    
    var m = map[interface{}]int{
    	T[struct{ int }]{}: 0,
    	T[struct {
    		int "x"
    	}]{}: 0,
    }
    
    func main() {
    	if len(m) != 2 {
    		panic(len(m))
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 01 19:45:34 UTC 2022
    - 347 bytes
    - Viewed (0)
Back to top