Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 272 for identical (0.39 sec)

  1. src/cmd/compile/internal/types2/typeterm.go

    	// easy cases
    	switch {
    	case x == nil || y == nil:
    		return x == y
    	case x.typ == nil || y.typ == nil:
    		return x.typ == y.typ
    	}
    	// ∅ ⊂ x, y ⊂ 𝓤
    
    	return x.tilde == y.tilde && Identical(x.typ, y.typ)
    }
    
    // union returns the union x ∪ y: zero, one, or two non-nil terms.
    func (x *term) union(y *term) (_, _ *term) {
    	// easy cases
    	switch {
    	case x == nil && y == nil:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 11 16:34:30 UTC 2022
    - 3.5K bytes
    - Viewed (0)
  2. src/go/types/typeterm.go

    	// easy cases
    	switch {
    	case x == nil || y == nil:
    		return x == y
    	case x.typ == nil || y.typ == nil:
    		return x.typ == y.typ
    	}
    	// ∅ ⊂ x, y ⊂ 𝓤
    
    	return x.tilde == y.tilde && Identical(x.typ, y.typ)
    }
    
    // union returns the union x ∪ y: zero, one, or two non-nil terms.
    func (x *term) union(y *term) (_, _ *term) {
    	// easy cases
    	switch {
    	case x == nil && y == nil:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Apr 03 18:48:38 UTC 2024
    - 3.6K bytes
    - Viewed (0)
  3. src/cmd/vendor/golang.org/x/tools/internal/typeparams/typeterm.go

    	// easy cases
    	switch {
    	case x == nil || y == nil:
    		return x == y
    	case x.typ == nil || y.typ == nil:
    		return x.typ == y.typ
    	}
    	// ∅ ⊂ x, y ⊂ 𝓤
    
    	return x.tilde == y.tilde && types.Identical(x.typ, y.typ)
    }
    
    // union returns the union x ∪ y: zero, one, or two non-nil terms.
    func (x *term) union(y *term) (_, _ *term) {
    	// easy cases
    	switch {
    	case x == nil && y == nil:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Sep 21 21:08:44 UTC 2023
    - 3.6K bytes
    - Viewed (0)
  4. src/go/types/conversions.go

    	Tu := under(T)
    	Vp, _ := V.(*TypeParam)
    	Tp, _ := T.(*TypeParam)
    
    	// "V and T have identical underlying types if tags are ignored
    	// and V and T are not type parameters"
    	if IdenticalIgnoreTags(Vu, Tu) && Vp == nil && Tp == nil {
    		return true
    	}
    
    	// "V and T are unnamed pointer types and their pointer base types
    	// have identical underlying types if tags are ignored
    	// and their pointer base types are not type parameters"
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 18:51:00 UTC 2024
    - 9.1K bytes
    - Viewed (0)
  5. test/fixedbugs/issue49665.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package main
    
    import "fmt"
    
    var x any
    var y interface{}
    
    var _ = &x == &y // assert x and y have identical types
    
    func main() {
    	fmt.Printf("%T\n%T\n", &x, &y)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 01 19:45:34 UTC 2022
    - 330 bytes
    - Viewed (0)
  6. src/cmd/cgo/internal/test/issue23555.go

    // Copyright 2018 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.
    
    //go:build cgo
    
    // Test that we can have two identical cgo packages in a single binary.
    // No runtime test; just make sure it compiles.
    
    package cgotest
    
    import (
    	_ "cmd/cgo/internal/test/issue23555a"
    	_ "cmd/cgo/internal/test/issue23555b"
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 12 12:00:02 UTC 2023
    - 403 bytes
    - Viewed (0)
  7. src/cmd/go/testdata/mod/example.com_stack_v1.0.0.txt

    Module with a function that prints file name for the top stack frame.
    Different versions of this module are identical, but they should return
    different file names with -trimpath.
    -- .mod --
    module example.com/stack
    
    go 1.14
    -- .info --
    {"Version":"v1.0.0"}
    -- stack.go --
    package stack
    
    import "runtime"
    
    func TopFile() string {
    	_, file, _, _ := runtime.Caller(0)
    	return file
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Nov 14 22:55:12 UTC 2019
    - 380 bytes
    - Viewed (0)
  8. src/cmd/go/testdata/mod/example.com_stack_v1.0.1.txt

    Module with a function that prints file name for the top stack frame.
    Different versions of this module are identical, but they should return
    different file names with -trimpath.
    -- .mod --
    module example.com/stack
    
    go 1.14
    -- .info --
    {"Version":"v1.0.1"}
    -- stack.go --
    package stack
    
    import "runtime"
    
    func TopFile() string {
    	_, file, _, _ := runtime.Caller(0)
    	return file
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Nov 14 22:55:12 UTC 2019
    - 380 bytes
    - Viewed (0)
  9. test/alias3.dir/c.go

    	var _ float64 = b.F(0)
    	var _ a.Rune = int32(0)
    
    	// embedded types can have different names but the same types
    	var s a.S
    	s.Int = 1
    	s.IntAlias = s.Int
    	s.IntAlias2 = s.Int
    
    	// aliases denote identical types across packages
    	var c a.Context = b.C
    	var _ b.MyContext = c
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jan 20 05:55:53 UTC 2017
    - 490 bytes
    - Viewed (0)
  10. src/internal/types/testdata/check/builtins1.go

    }
    
    func _[T ~[]byte](x, y T) {
    	copy(x, y)
    	copy(x, "foo")
    	copy("foo" /* ERROR "expects slice arguments" */ , y)
    
    	var x2 []byte
    	copy(x2, y) // element types are identical
    	copy(y, x2) // element types are identical
    
    	type myByte byte
    	var x3 []myByte
    	copy(x3 /* ERROR "different element types" */ , y)
    	copy(y /* ERROR "different element types" */ , x3)
    }
    
    func _[T ~[]E, E any](x T, y []E) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 18 21:16:29 UTC 2023
    - 6.8K bytes
    - Viewed (0)
Back to top