- Sort Score
- Result 10 results
- Languages All
Results 141 - 150 of 947 for asSlice (0.18 sec)
-
src/internal/types/testdata/check/expr3.go
_ = a[:10:10] _ = a[:11 /* ERRORx `index .* out of bounds` */ :10] _ = a[:10:11 /* ERRORx `index .* out of bounds` */ ] _ = a[10:0 /* ERROR "invalid slice indices" */ :10] _ = a[0:10:0 /* ERROR "invalid slice indices" */ ] _ = a[10:0 /* ERROR "invalid slice indices" */:0] _ = &a /* ERROR "cannot take address" */ [:10] pa := &a _ = pa[9] _ = pa[10 /* ERRORx `index .* out of bounds` */ ]
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 16 22:41:49 UTC 2023 - 15.6K bytes - Viewed (0) -
test/typeparam/issue52117.dir/a.go
// Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package a func Compare[T int | uint](a, b T) int { return 0 } type Slice[T int | uint] struct{} func (l Slice[T]) Comparator() func(v1, v2 T) int { return Compare[T]
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Apr 28 20:14:34 UTC 2022 - 333 bytes - Viewed (0) -
test/fixedbugs/issue19323.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Sep 23 19:41:41 UTC 2021 - 460 bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/sys/unix/syscall_linux_amd64.go
//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) //sys setfsgid(gid int) (prev int, err error) //sys setfsuid(uid int) (prev int, err error) //sys Shutdown(fd int, how int) (err error) //sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error) func Stat(path string, stat *Stat_t) (err error) { // Use fstatat, because Android's seccomp policy blocks stat.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 19 23:33:33 UTC 2023 - 5.3K bytes - Viewed (0) -
test/fixedbugs/issue46938.go
"unsafe" ) func main() { defer func() { err := recover() if err == nil { panic("expected panic") } if got := err.(error).Error(); !strings.Contains(got, "slice bounds out of range") { panic("expected panic slice out of bound, got " + got) } }() s := make([]int64, 100) p := unsafe.Pointer(&s[0]) n := 1000 _ = (*[10]int64)(p)[:n:n]
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Aug 25 01:57:42 UTC 2021 - 584 bytes - Viewed (0) -
src/internal/types/testdata/check/go1_19.go
// Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Check Go language version-specific errors. package p type Slice []byte type Array [8]byte var s Slice
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Jan 17 19:54:25 UTC 2023 - 343 bytes - Viewed (0) -
src/internal/types/testdata/check/go1_21_19.go
// Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Check Go language version-specific errors. //go:build go1.19 package p type Slice []byte type Array [8]byte var s Slice
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Apr 14 16:08:31 UTC 2023 - 362 bytes - Viewed (0) -
test/fixedbugs/issue35291.go
// Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Check error message for duplicated index in slice literal package p var s = []string{ 1: "dup", 1: "dup", // ERROR "duplicate index in slice literal: 1|duplicate value for index 1|duplicate index 1"
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Dec 22 17:50:13 UTC 2020 - 383 bytes - Viewed (0) -
src/cmd/compile/internal/ssa/decompose.go
} f.NamedValues[*ptrName] = append(f.NamedValues[*ptrName], v.Args[0]) f.NamedValues[*lenName] = append(f.NamedValues[*lenName], v.Args[1]) toDelete = append(toDelete, namedVal{i, j}) } case t.IsSlice(): ptrName, lenName, capName := f.SplitSlice(name) newNames = maybeAppend2(f, newNames, ptrName, lenName) newNames = maybeAppend(f, newNames, capName) for j, v := range f.NamedValues[*name] {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Aug 23 21:22:15 UTC 2022 - 13.4K bytes - Viewed (0) -
src/go/types/subst.go
} case *Array: elem := subst.typOrNil(t.elem) if elem != t.elem { return &Array{len: t.len, elem: elem} } case *Slice: elem := subst.typOrNil(t.elem) if elem != t.elem { return &Slice{elem: elem} } case *Struct: if fields, copied := subst.varList(t.fields); copied { s := &Struct{fields: fields, tags: t.tags} s.markComplete() return s
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 03:04:07 UTC 2024 - 11.1K bytes - Viewed (0)