Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 112 for S1 (0.07 sec)

  1. 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)
  2. 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)
  3. 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)
  4. 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)
  5. 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)
  6. 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)
  7. 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)
  8. 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)
  9. src/go/ast/commentmap_test.go

    	z    complex128 // complex value
    }
    // also associated with T
    
    // x
    var x = 0 // x = 0
    // also associated with x
    
    // f1
    func f1() {
    	/* associated with s1 */
    	s1()
    	// also associated with s1
    	
    	// associated with s2
    	
    	// also associated with s2
    	s2() // line comment for s2
    }
    // associated with f1
    // also associated with f1
    
    // associated with f2
    
    // f2
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Sep 09 15:35:30 UTC 2022
    - 3.9K bytes
    - Viewed (0)
  10. platforms/core-configuration/kotlin-dsl-tooling-builders/src/crossVersionTest/groovy/org/gradle/kotlin/dsl/tooling/builders/r54/AccessorsClassPathModelCrossVersionSpec.groovy

            def s1 = setOfAutomaticAccessorsFor(["application"])
            def s2 = setOfAutomaticAccessorsFor(["java"])
            def s3 = setOfAutomaticAccessorsFor(["application"])
            def s4 = setOfAutomaticAccessorsFor(["application", "java"])
            def s5 = setOfAutomaticAccessorsFor(["java"])
    
            expect:
            assertThat(s1, not(equalTo(s2))) // application ≠ java
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Wed Aug 02 08:06:49 UTC 2023
    - 4.1K bytes
    - Viewed (0)
Back to top