Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 311 for S1 (0.04 sec)

  1. 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)
  2. test/typeparam/issue50109b.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package main
    
    func main() {
    	F[any]()
    }
    
    func F[T any]() I[T] {
    	return (*S1[T])(nil)
    }
    
    type I[T any] interface{}
    
    type S1[T any] struct {
    	*S2[T]
    }
    
    type S2[T any] struct {
    	S3 *S3[T]
    }
    
    type S3[T any] struct {
    	x int
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 01 19:45:34 UTC 2022
    - 390 bytes
    - Viewed (0)
  3. src/cmd/internal/obj/objfile_test.go

    )
    
    var dummyArch = LinkArch{Arch: sys.ArchAMD64}
    
    func TestContentHash64(t *testing.T) {
    	s1 := &LSym{P: []byte("A")}
    	s2 := &LSym{P: []byte("A\x00\x00\x00")}
    	s1.Set(AttrContentAddressable, true)
    	s2.Set(AttrContentAddressable, true)
    	h1 := contentHash64(s1)
    	h2 := contentHash64(s2)
    	if h1 != h2 {
    		t.Errorf("contentHash64(s1)=%x, contentHash64(s2)=%x, expect equal", h1, h2)
    	}
    
    	ctxt := Linknew(&dummyArch) // little endian
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Nov 15 20:21:30 UTC 2022
    - 3.7K bytes
    - Viewed (0)
  4. test/typeparam/sliceimp.dir/a.go

    	return b
    }
    
    // Equal reports whether two slices are equal: the same length and all
    // elements equal. All floating point NaNs are considered equal.
    func Equal[Elem comparable](s1, s2 []Elem) bool {
    	if len(s1) != len(s2) {
    		return false
    	}
    	for i, v1 := range s1 {
    		v2 := s2[i]
    		if v1 != v2 {
    			isNaN := func(f Elem) bool { return f != f }
    			if !isNaN(v1) || !isNaN(v2) {
    				return false
    			}
    		}
    	}
    	return true
    }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Aug 30 01:55:58 UTC 2021
    - 3.3K bytes
    - Viewed (0)
  5. android/guava-tests/test/com/google/common/base/ObjectsTest.java

        assertTrue(Objects.equal(1, 1));
        assertTrue(Objects.equal(null, null));
    
        // test distinct string objects
        String s1 = "foobar";
        String s2 = new String(s1);
        assertTrue(Objects.equal(s1, s2));
    
        assertFalse(Objects.equal(s1, null));
        assertFalse(Objects.equal(null, s1));
        assertFalse(Objects.equal("foo", "bar"));
        assertFalse(Objects.equal("1", 1));
      }
    
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed Feb 21 18:32:41 UTC 2024
    - 2.3K bytes
    - Viewed (0)
  6. src/log/slog/handler_test.go

    			with: func(h Handler) Handler {
    				return h.WithAttrs([]Attr{Int("p1", 1)}).
    					WithGroup("s1").
    					WithAttrs([]Attr{Int("p2", 2)}).
    					WithGroup("s2").
    					WithAttrs([]Attr{Int("p3", 3)})
    			},
    			attrs:    attrs,
    			wantText: "msg=message p1=1 s1.p2=2 s1.s2.p3=3 s1.s2.a=one s1.s2.b=2",
    			wantJSON: `{"msg":"message","p1":1,"s1":{"p2":2,"s2":{"p3":3,"a":"one","b":2}}}`,
    		},
    		{
    			name:    "two with-groups",
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Oct 02 13:57:53 UTC 2023
    - 19.6K bytes
    - Viewed (0)
  7. src/internal/types/testdata/check/expr2.go

    	var k interface { m() float32 }
    	_ = i == ii
    	_ = i == k /* ERROR "mismatched types" */
    
    	// interfaces vs values
    	var s1 S1
    	var s11 S11
    	var s2 S2
    
    	_ = i == 0 /* ERROR "cannot convert" */
    	_ = i == s1 /* ERROR "mismatched types" */
    	_ = i == &s1
    	_ = i == &s11
    
    	_ = i == s2 /* ERROR "mismatched types" */
    	_ = i == & /* ERROR "mismatched types" */ s2
    
    	// issue #28164
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jan 17 19:54:27 UTC 2023
    - 5K bytes
    - Viewed (0)
  8. test/typeparam/interfacearg.go

    func F() {
    	v := _S[I]{}
    	if v.x != nil {
    		panic(v)
    	}
    }
    
    // Testing the various combinations of method expressions.
    type S1 struct{}
    
    func (*S1) M() {}
    
    type S2 struct{}
    
    func (S2) M() {}
    
    func _F1[T interface{ M() }](t T) {
    	_ = T.M
    }
    
    func F2() {
    	_F1(&S1{})
    	_F1(S2{})
    	_F1(&S2{})
    }
    
    func main() {
    	F()
    	F2()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 01 19:45:34 UTC 2022
    - 692 bytes
    - Viewed (0)
  9. test/fixedbugs/issue8606.go

    		{true, T3{i: b, s: "foo"}, T3{i: b, s: "bar"}},
    		{false, T3{s: "foo", j: b}, T3{s: "bar", j: b}},
    		{true, T3{i: b, s: "fooz"}, T3{i: b, s: "bar"}},
    		{false, T3{s: "fooz", j: b}, T3{s: "bar", j: b}},
    		{true, A{s1, s2}, A{s2, s1}},
    		{true, s1, s2},
    		{false, S4{[1000]byte{0}, func() {}}, S4{[1000]byte{1}, func() {}}},
    	} {
    		f := func() {
    			defer func() {
    				if recover() != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 24 21:55:14 UTC 2023
    - 2.3K bytes
    - Viewed (0)
  10. src/cmd/cgo/internal/testsanitizers/testdata/asan_linkerx/main.go

    func pstring(s *string) {
    	println(*s)
    }
    
    func main() {
    	all := []*string{
    		&S1, &S2, &S3, &S4, &S5, &S6, &S7, &S8, &S9, &S10,
    		&p.S1, &p.S2, &p.S3, &p.S4, &p.S5, &p.S6, &p.S7, &p.S8, &p.S9, &p.S10,
    	}
    	for _, ps := range all {
    		pstring(ps)
    	}
    }
    
    var S1 string
    var S2 string
    var S3 string
    var S4 string
    var S5 string
    var S6 string
    var S7 string
    var S8 string
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 12 11:59:56 UTC 2023
    - 471 bytes
    - Viewed (0)
Back to top