- Sort Score
- Result 10 results
- Languages All
Results 51 - 60 of 261 for S1 (0.02 sec)
-
src/internal/types/testdata/check/cycles0.go
A3 [10]A4 A4 A2 A5 [10]A6 A6 *A5 // slices L0 []L0 // structs S0 /* ERROR "invalid recursive type: S0 refers to itself" */ struct{ _ S0 } S1 /* ERROR "invalid recursive type: S1 refers to itself" */ struct{ S1 } S2 struct{ _ *S2 } S3 struct{ *S3 } S4 /* ERROR "invalid recursive type" */ struct{ S5 } S5 struct{ S6 } S6 S4 // pointers P0 *P0
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Jan 17 19:54:25 UTC 2023 - 3.6K bytes - Viewed (0) -
src/internal/types/testdata/fixedbugs/issue51257.go
// Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package p func f[_ comparable]() {} type S1 struct{ x int } type S2 struct{ x any } type S3 struct{ x [10]interface{ m() } } func _[P1 comparable, P2 S2]() { _ = f[S1] _ = f[S2] _ = f[S3] type L1 struct { x P1 } type L2 struct { x P2 } _ = f[L1] _ = f[L2 /* ERROR "L2 does not satisfy comparable" */ ] }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Jan 17 19:56:37 UTC 2023 - 766 bytes - Viewed (0) -
test/fixedbugs/issue65893.go
// compile // Copyright 2024 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 p type ( s = struct{ f func(s1) } s1 = struct{ i I } ) type I interface { S() *s
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 16 01:45:48 UTC 2024 - 269 bytes - Viewed (0) -
src/internal/types/testdata/fixedbugs/issue57522.go
// A simplified version of the code in the original report. type S[T any] struct{} var V = S[any]{} func (fs *S[T]) M(V.M /* ERROR "V.M is not a type" */) {} // Other minimal reproducers. type S1[T any] V1.M /* ERROR "V1.M is not a type" */ type V1 = S1[any] type S2[T any] struct{} type V2 = S2[any] func (fs *S2[T]) M(x V2.M /* ERROR "V2.M is not a type" */ ) {} // The following still panics, as the selector is reached from check.expr
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Jan 11 22:29:34 UTC 2023 - 728 bytes - Viewed (0) -
src/internal/types/testdata/fixedbugs/issue67547.go
} func _[P map[int]int]() { type A = P var m A clear(m) // don't report an error for m } type S1 struct { x int "S1.x" } type S2 struct { x int "S2.x" } func _[P1 S1, P2 S2]() { type A = P1 var p A _ = P2(p) // conversion must be valid } func _[P1 S1, P2 S2]() { var p P1 type A = P2 _ = A(p) // conversion must be valid } func _[P int | string]() {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 21:17:10 UTC 2024 - 1.8K bytes - Viewed (0) -
test/typeparam/issue53087.go
func CloneBad[M ~map[K]V, K comparable, V any](m M) M { r := make(M, len(m)) for k, v := range m { r[k] = v } return r } func main() { s1 := &S{"one"} s2 := &S{"two"} m := CloningMap[string, I]{inner: make(map[string]I)} m = m.With("a", s1) m = m.With("b", s2) it, found := m.inner["a"] if !found { panic("a not found") } if _, ok := it.(*S); !ok {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Mar 08 16:23:09 UTC 2023 - 930 bytes - Viewed (0) -
guava-tests/test/com/google/common/base/MoreObjectsTest.java
/** Tests for {@link MoreObjects}. */ @GwtCompatible(emulated = true) public class MoreObjectsTest extends TestCase { public void testFirstNonNull_withNonNull() { String s1 = "foo"; String s2 = MoreObjects.firstNonNull(s1, "bar"); assertSame(s1, s2); Long n1 = 42L; Long n2 = MoreObjects.firstNonNull(null, n1); assertSame(n1, n2); Boolean b1 = true;
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Thu Feb 22 21:24:55 UTC 2024 - 2K bytes - Viewed (0) -
src/runtime/runtime_test.go
v := *(*byte)(unsafe.Pointer(addr)) t.Logf("addr %#x: %#x\n", addr, v) } func eqstring_generic(s1, s2 string) bool { if len(s1) != len(s2) { return false } // optimization in assembly versions: // if s1.str == s2.str { return true } for i := 0; i < len(s1); i++ { if s1[i] != s2[i] { return false } } return true } func TestEqString(t *testing.T) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 11.7K bytes - Viewed (0) -
src/crypto/elliptic/params.go
h.Add(h, curve.P) } i := new(big.Int).Lsh(h, 1) i.Mul(i, i) j := new(big.Int).Mul(h, i) s1 := new(big.Int).Mul(y1, z2) s1.Mul(s1, z2z2) s1.Mod(s1, curve.P) s2 := new(big.Int).Mul(y2, z1) s2.Mul(s2, z1z1) s2.Mod(s2, curve.P) r := new(big.Int).Sub(s2, s1) if r.Sign() == -1 { r.Add(r, curve.P) } yEqual := r.Sign() == 0 if xEqual && yEqual {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 16 17:46:09 UTC 2024 - 9.6K bytes - Viewed (0) -
src/math/rand/rand_test.go
// disagree, or <0 if the lengths are the same and all elements // are identical. func compareUint32Slices(s1, s2 []uint32) int { if len(s1) != len(s2) { if len(s1) > len(s2) { return len(s2) + 1 } return len(s1) + 1 } for i := range s1 { if s1[i] != s2[i] { return i } } return -1 } // compareFloat32Slices returns the first index where the two slices
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 18:42:28 UTC 2024 - 16.9K bytes - Viewed (0)