Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 118 for nilslice (0.22 sec)

  1. src/go/types/instantiate_test.go

    		{
    			"package differenttypeargs; type T[P any] int",
    			"T", []Type{Typ[Int]},
    			"T", []Type{Typ[String]},
    			false,
    		},
    		{
    			"package typeslice; type T[P any] int",
    			"T", []Type{NewSlice(Typ[Int])},
    			"T", []Type{NewSlice(Typ[Int])},
    			true,
    		},
    		{
    			// interface{interface{...}} is equivalent to interface{...}
    			"package equivalentinterfaces; type T[P any] int",
    			"T", []Type{
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Apr 03 18:48:38 UTC 2024
    - 5.9K bytes
    - Viewed (0)
  2. src/cmd/compile/internal/types2/slice.go

    // license that can be found in the LICENSE file.
    
    package types2
    
    // 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: Thu Jul 01 22:17:50 UTC 2021
    - 577 bytes
    - Viewed (0)
  3. src/sort/sort_test.go

    	}
    	Ints(data)
    	if !IntsAreSorted(data) {
    		t.Errorf("sort didn't sort - 1M ints")
    	}
    }
    
    func TestReverseSortIntSlice(t *testing.T) {
    	data := ints
    	data1 := ints
    	a := IntSlice(data[0:])
    	Sort(a)
    	r := IntSlice(data1[0:])
    	Sort(Reverse(r))
    	for i := 0; i < len(data); i++ {
    		if a[i] != r[len(data)-1-i] {
    			t.Errorf("reverse sort didn't sort")
    		}
    		if i > len(data)/2 {
    			break
    		}
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 07 19:41:04 UTC 2024
    - 16.9K bytes
    - Viewed (0)
  4. src/slices/slices.go

    	if hi, lo := bits.Mul(uint(len(x)), uint(count)); hi > 0 || lo > maxInt {
    		panic("the result of (len(x) * count) overflows")
    	}
    
    	newslice := make(S, len(x)*count)
    	n := copy(newslice, x)
    	for n < len(newslice) {
    		n += copy(newslice[n:], newslice[:n])
    	}
    	return newslice
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 29 14:01:59 UTC 2024
    - 13.6K bytes
    - Viewed (0)
  5. src/go/types/slice.go

    // license that can be found in the LICENSE file.
    
    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)
  6. test/typeparam/issue51925.go

    	}
    	return result
    }
    
    func min[T IntLike](x, y T) T {
    	if x < y {
    		return x
    	}
    	return y
    }
    
    // Min returns the minimum element of `nums`.
    func Min[T IntLike, NumSlice ~[]T](nums NumSlice) T {
    	if len(nums) == 0 {
    		return T(0)
    	}
    	return Reduce(min[T], nums, nums[0])
    }
    
    // VarMin is the variadic version of Min.
    func VarMin[T IntLike](nums ...T) T {
    	return Min(nums)
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Dec 14 17:22:18 UTC 2023
    - 963 bytes
    - Viewed (0)
  7. staging/src/k8s.io/api/testdata/v1.30.0/resource.k8s.io.v1alpha2.ResourceSlice.yaml

        name: nameValue
        uid: uidValue
      resourceVersion: resourceVersionValue
      selfLink: selfLinkValue
      uid: uidValue
    namedResources:
      instances:
      - attributes:
        - bool: true
          int: 7
          intSlice:
            ints:
            - 1
          name: nameValue
          quantity: "0"
          string: stringValue
          stringSlice:
            strings:
            - stringsValue
          version: versionValue
        name: nameValue
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Apr 18 08:52:25 UTC 2024
    - 1.2K bytes
    - Viewed (0)
  8. src/cmd/compile/internal/ssa/_gen/allocators.go

    		},
    		{
    			name: "IntSlice",
    			typ:  "[]int",
    			base: "Int64Slice",
    		},
    		{
    			name: "Int32Slice",
    			typ:  "[]int32",
    			base: "Int64Slice",
    		},
    		{
    			name: "Int8Slice",
    			typ:  "[]int8",
    			base: "Int64Slice",
    		},
    		{
    			name: "BoolSlice",
    			typ:  "[]bool",
    			base: "Int64Slice",
    		},
    		{
    			name: "IDSlice",
    			typ:  "[]ID",
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Nov 17 23:34:11 UTC 2023
    - 6.7K bytes
    - Viewed (0)
  9. src/sort/sort.go

    // Convenience types for common cases
    
    // IntSlice attaches the methods of Interface to []int, sorting in increasing order.
    type IntSlice []int
    
    func (x IntSlice) Len() int           { return len(x) }
    func (x IntSlice) Less(i, j int) bool { return x[i] < x[j] }
    func (x IntSlice) Swap(i, j int)      { x[i], x[j] = x[j], x[i] }
    
    // Sort is a convenience method: x.Sort() calls Sort(x).
    func (x IntSlice) Sort() { Sort(x) }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Nov 28 16:40:32 UTC 2023
    - 10.1K bytes
    - Viewed (0)
  10. src/cmd/compile/internal/types2/instantiate_test.go

    		{
    			"package differenttypeargs; type T[P any] int",
    			"T", []Type{Typ[Int]},
    			"T", []Type{Typ[String]},
    			false,
    		},
    		{
    			"package typeslice; type T[P any] int",
    			"T", []Type{NewSlice(Typ[Int])},
    			"T", []Type{NewSlice(Typ[Int])},
    			true,
    		},
    		{
    			// interface{interface{...}} is equivalent to interface{...}
    			"package equivalentinterfaces; type T[P any] int",
    			"T", []Type{
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 28 17:58:07 UTC 2023
    - 5.8K bytes
    - Viewed (0)
Back to top