Search Options

Results per page
Sort
Preferred Languages
Advance

Results 121 - 130 of 522 for Map (0.47 sec)

  1. test/fixedbugs/issue47068.dir/a.go

    // license that can be found in the LICENSE file.
    
    package a
    
    func A() {
    	var m map[int]int = map[int]int{
    		0: 0, 1: 0, 2: 0, 3: 0, 4: 0, 5: 0, 6: 0, 7: 0, 8: 0, 9: 0,
    		10: 0, 11: 0, 12: 0, 13: 0, 14: 0, 15: 0, 16: 0, 17: 0, 18: 0, 19: 0,
    		20: 0, 21: 0, 22: 0, 23: 0, 24: 0, 25: 0, 26: 0, 27: 0, 28: 0, 29: 0}
    	if len(m) != 30 {
    		panic("unexpected map length")
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jan 09 15:34:31 UTC 2023
    - 479 bytes
    - Viewed (0)
  2. src/cmd/compile/internal/types2/self_test.go

    		}
    		var info *Info
    		if writeInfo {
    			info = &Info{
    				Types:      make(map[syntax.Expr]TypeAndValue),
    				Defs:       make(map[*syntax.Name]Object),
    				Uses:       make(map[*syntax.Name]Object),
    				Implicits:  make(map[syntax.Node]Object),
    				Selections: make(map[*syntax.SelectorExpr]*Selection),
    				Scopes:     make(map[syntax.Node]*Scope),
    			}
    		}
    		if _, err := conf.Check(path, files, info); err != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 23 19:39:00 UTC 2023
    - 2.8K bytes
    - Viewed (0)
  3. src/internal/types/testdata/fixedbugs/issue39755.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package p
    
    func _[T interface{~map[string]int}](x T) {
    	_ = x == nil
    }
    
    // simplified test case from issue
    
    type PathParamsConstraint interface {
            ~map[string]string | ~[]struct{key, value string}
    }
    
    type PathParams[T PathParamsConstraint] struct {
    	t T
    }
    
    func (pp *PathParams[T]) IsNil() bool {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Sep 02 02:58:32 UTC 2022
    - 507 bytes
    - Viewed (0)
  4. src/internal/types/testdata/fixedbugs/issue45635.go

    func main() {
    	some /* ERROR "undefined" */ [int, int]()
    }
    
    type N[T any] struct{}
    
    var _ N [] // ERROR "expected type argument list"
    
    type I interface {
    	~[]int
    }
    
    func _[T I](i, j int) {
    	var m map[int]int
    	_ = m[i, j /* ERROR "more than one index" */ ]
    
    	var a [3]int
    	_ = a[i, j /* ERROR "more than one index" */ ]
    
    	var s []int
    	_ = s[i, j /* ERROR "more than one index" */ ]
    
    	var t T
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jan 17 19:54:25 UTC 2023
    - 615 bytes
    - Viewed (0)
  5. test/typeparam/graph.go

    // as an ordered list of edges. If there are multiple shortest paths,
    // which one is returned is unpredictable.
    func (g *_Graph[_Node, _Edge]) ShortestPath(from, to _Node) ([]_Edge, error) {
    	visited := make(map[_Node]bool)
    	visited[from] = true
    	workqueue := []nodePath[_Node, _Edge]{nodePath[_Node, _Edge]{from, nil}}
    	for len(workqueue) > 0 {
    		current := workqueue
    		workqueue = nil
    		for _, np := range current {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 26 19:58:28 UTC 2024
    - 5.7K bytes
    - Viewed (0)
  6. src/go/internal/srcimporter/srcimporter_test.go

    )
    
    func TestMain(m *testing.M) {
    	flag.Parse()
    	build.Default.GOROOT = testenv.GOROOT(nil)
    	os.Exit(m.Run())
    }
    
    const maxTime = 2 * time.Second
    
    var importer = New(&build.Default, token.NewFileSet(), make(map[string]*types.Package))
    
    func doImport(t *testing.T, path, srcDir string) {
    	t0 := time.Now()
    	if _, err := importer.ImportFrom(path, srcDir, 0); err != nil {
    		// don't report an error if there's no buildable Go files
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 12 12:00:02 UTC 2023
    - 6.5K bytes
    - Viewed (0)
  7. src/internal/dag/parse.go

    package dag
    
    import (
    	"cmp"
    	"fmt"
    	"slices"
    	"strings"
    )
    
    type Graph struct {
    	Nodes   []string
    	byLabel map[string]int
    	edges   map[string]map[string]bool
    }
    
    func newGraph() *Graph {
    	return &Graph{byLabel: map[string]int{}, edges: map[string]map[string]bool{}}
    }
    
    func (g *Graph) addNode(label string) bool {
    	if _, ok := g.byLabel[label]; ok {
    		return false
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 6.7K bytes
    - Viewed (0)
  8. src/vendor/golang.org/x/net/route/sys.go

    //go:build darwin || dragonfly || freebsd || netbsd || openbsd
    
    package route
    
    import (
    	"syscall"
    	"unsafe"
    )
    
    var (
    	nativeEndian binaryByteOrder
    	kernelAlign  int
    	rtmVersion   byte
    	wireFormats  map[int]*wireFormat
    )
    
    func init() {
    	i := uint32(1)
    	b := (*[4]byte)(unsafe.Pointer(&i))
    	if b[0] == 1 {
    		nativeEndian = littleEndian
    	} else {
    		nativeEndian = bigEndian
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 23:33:33 UTC 2023
    - 940 bytes
    - Viewed (0)
  9. src/net/internal/socktest/switch_unix.go

    // license that can be found in the LICENSE file.
    
    //go:build unix || (js && wasm) || wasip1
    
    package socktest
    
    // Sockets maps a socket descriptor to the status of socket.
    type Sockets map[int]Status
    
    func (sw *Switch) sockso(s int) *Status {
    	sw.smu.RLock()
    	defer sw.smu.RUnlock()
    	so, ok := sw.sotab[s]
    	if !ok {
    		return nil
    	}
    	return &so
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 11 20:54:10 UTC 2023
    - 718 bytes
    - Viewed (0)
  10. src/vendor/golang.org/x/net/route/sys_darwin.go

    	return []Sys{
    		&InterfaceMetrics{
    			Type: int(m.raw[m.extOff]),
    			MTU:  int(nativeEndian.Uint32(m.raw[m.extOff+8 : m.extOff+12])),
    		},
    	}
    }
    
    func probeRoutingStack() (int, map[int]*wireFormat) {
    	rtm := &wireFormat{extOff: 36, bodyOff: sizeofRtMsghdrDarwin15}
    	rtm.parse = rtm.parseRouteMessage
    	rtm2 := &wireFormat{extOff: 36, bodyOff: sizeofRtMsghdr2Darwin15}
    	rtm2.parse = rtm2.parseRouteMessage
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Aug 05 19:54:32 UTC 2022
    - 2.8K bytes
    - Viewed (0)
Back to top