- Sort Score
- Result 10 results
- Languages All
Results 71 - 80 of 311 for S1 (0.02 sec)
-
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/go/parser/testdata/linalg.go2
~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: Thu Oct 28 15:34:22 UTC 2021 - 2K 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) -
statement_test.go
s.AddClause(clause.Where{ Exprs: s.BuildCondition(fmt.Sprintf("where%d", w)), }) } s1 := s.clone() s1.AddClause(clause.Where{ Exprs: s.BuildCondition("FINAL1"), }) s2 := s.clone() s2.AddClause(clause.Where{ Exprs: s.BuildCondition("FINAL2"), }) if reflect.DeepEqual(s1.Clauses["WHERE"], s2.Clauses["WHERE"]) { t.Errorf("Where conditions should be different") } }) }
Registered: Wed Jun 12 16:27:09 UTC 2024 - Last Modified: Sat Dec 23 13:19:41 UTC 2023 - 1.9K bytes - Viewed (0) -
src/cmd/compile/internal/test/abiutils_test.go
} func TestABIUtilsMethod(t *testing.T) { // type s1 struct { f1 int16; f2 int16; f3 int16 } // func(p1 *s1, p2 [7]*s1, p3 float64, p4 int16, p5 int16, p6 int16) // (r1 [7]*s1, r2 float64, r3 int64) i16 := types.Types[types.TINT16] i64 := types.Types[types.TINT64] f64 := types.Types[types.TFLOAT64] s1 := mkstruct(i16, i16, i16) ps1 := types.NewPtr(s1) a7 := types.NewArray(ps1, 7)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Oct 04 15:11:40 UTC 2023 - 14.2K bytes - Viewed (0)