- Sort Score
- Result 10 results
- Languages All
Results 71 - 80 of 385 for S1 (0.02 sec)
-
test/fixedbugs/issue15042.go
// license that can be found in the LICENSE file. // Exchanging two struct fields was compiled incorrectly. package main type S struct { i int } func F(c bool, s1, s2 S) (int, int) { if c { s1.i, s2.i = s2.i, s1.i } return s1.i, s2.i } func main() { i, j := F(true, S{1}, S{20}) if i != 20 || j != 1 { panic(i+j) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 02 13:43:18 UTC 2016 - 450 bytes - Viewed (0) -
test/fixedbugs/bug478.dir/a.go
// Copyright 2013 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 p1 type S1 struct{}
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 02 13:43:18 UTC 2016 - 209 bytes - Viewed (0) -
test/typeparam/struct.go
import ( "fmt" ) type E[T any] struct { v T } type S1 struct { E[int] v string } type Eint = E[int] type Ebool = E[bool] type Eint2 = Eint type S2 struct { Eint Ebool v string } type S3 struct { *E[int] } func main() { s1 := S1{Eint{2}, "foo"} if got, want := s1.E.v, 2; got != want { panic(fmt.Sprintf("got %d, want %d", got, want)) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Apr 05 16:29:58 UTC 2024 - 801 bytes - Viewed (0) -
src/cmd/compile/internal/syntax/testdata/linalg.go
uint | ~uint8 | ~uint16 | ~uint32 | ~uint64 | ~uintptr | float32 | ~float64 | complex64 | ~complex128 } func DotProduct[T Numeric](s1, s2 []T) T { if len(s1) != len(s2) { panic("DotProduct: slices of unequal length") } var r T for i := range s1 { r += s1[i] * s2[i] } return r } // NumericAbs matches numeric types with an Abs method. type NumericAbs[T any] interface { Numeric
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Mar 30 18:02:18 UTC 2022 - 2.1K bytes - Viewed (0) -
src/io/fs/readdir_test.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Nov 27 16:25:41 UTC 2023 - 2.6K bytes - Viewed (0) -
test/fixedbugs/bug1515.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 02 13:43:18 UTC 2016 - 320 bytes - Viewed (0) -
src/go/printer/testdata/comments.x
type S0 struct { // contains filtered or unexported fields } // The S1 struct; some fields are not exported. type S1 struct { S0 A, B, C float // 3 exported fields D int // 2 unexported fields // contains filtered or unexported fields } // The S2 struct; all fields are exported. type S2 struct { S1 A, B, C float // 3 exported fields } // The IZ interface; it is empty.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Apr 11 16:31:50 UTC 2022 - 1.2K bytes - Viewed (0) -
src/slices/slices.go
// returns 0 the result is 0 if len(s1) == len(s2), -1 if len(s1) < len(s2), // and +1 if len(s1) > len(s2). func CompareFunc[S1 ~[]E1, S2 ~[]E2, E1, E2 any](s1 S1, s2 S2, cmp func(E1, E2) int) int { for i, v1 := range s1 { if i >= len(s2) { return +1 } v2 := s2[i] if c := cmp(v1, v2); c != 0 { return c } } if len(s1) < len(s2) { return -1 } return 0 }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Apr 29 14:01:59 UTC 2024 - 13.6K bytes - Viewed (0) -
guava-tests/benchmark/com/google/common/base/ObjectsBenchmark.java
} return dummy; } @Benchmark int hashString_5(int reps) { int dummy = 0; for (int i = 0; i < reps; i++) { dummy += Objects.hashCode(S0, S1, S2, S3, S4); } return dummy; } @Benchmark int hashMixed_5(int reps) { int dummy = 0; for (int i = 0; i < reps; i++) { dummy += Objects.hashCode(I2, S1, D1, S2, I0);
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Mon Dec 04 17:37:03 UTC 2017 - 2.2K bytes - Viewed (0) -
src/internal/types/testdata/fixedbugs/issue49735.go
// Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package p func _[P1 any, P2 ~byte](s1 P1, s2 P2) { _ = append(nil /* ERROR "first argument to append must be a slice; have untyped nil" */ , 0) _ = append(s1 /* ERRORx `s1 .* has no core type` */ , 0) _ = append(s2 /* ERRORx `s2 .* has core type byte` */ , 0)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Jan 17 19:54:27 UTC 2023 - 447 bytes - Viewed (0)