Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 472 for incomparable (0.2 sec)

  1. src/internal/types/testdata/fixedbugs/issue48712.go

    	_ = x /* ERROR "incomparable types in type set" */ == y
    	_ = y /* ERROR "incomparable types in type set" */ == x
    	_ = y /* ERROR "incomparable types in type set" */ == y
    
    	_ = x /* ERROR "type parameter P is not comparable with <" */ < y
    }
    
    func _[P any](x P, y any) {
    	_ = x /* ERROR "incomparable types in type set" */ == x
    	_ = x /* ERROR "incomparable types in type set" */ == y
    	_ = y == x // ERROR "incomparable types in type set"
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jan 17 19:54:25 UTC 2023
    - 1.1K bytes
    - Viewed (0)
  2. src/internal/types/testdata/spec/comparisons.go

    	_ = b < b
    	_ = a /* ERROR "type parameter A is not comparable with <" */ < a
    	_ = l /* ERROR "type parameter L is not comparable with <" */ < l
    	_ = s /* ERROR "type parameter S is not comparable with <" */ < s
    	_ = p /* ERROR "type parameter P is not comparable with <" */ < p
    	_ = f /* ERROR "type parameter F is not comparable with <" */ < f
    	_ = i /* ERROR "type parameter I is not comparable with <" */ < i
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jan 17 19:54:27 UTC 2023
    - 3K bytes
    - Viewed (0)
  3. src/vendor/golang.org/x/net/http2/hpack/huffman.go

    		return ErrInvalidHuffman
    	}
    
    	return nil
    }
    
    // incomparable is a zero-width, non-comparable type. Adding it to a struct
    // makes that struct also non-comparable, and generally doesn't add
    // any size (as long as it's first).
    type incomparable [0]func()
    
    type node struct {
    	_ incomparable
    
    	// children is non-nil for internal nodes
    	children *[256]*node
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Aug 05 19:54:32 UTC 2022
    - 5.8K bytes
    - Viewed (0)
  4. src/internal/types/testdata/fixedbugs/issue51525.go

    	_ = x /* ERROR "empty type set" */ + x
    	<-x /* ERROR "empty type set" */
    	x <- /* ERROR "empty type set" */ 0
    	close(x /* ERROR "empty type set" */)
    }
    
    func _[T interface{ int | []byte }](x T) {
    	_ = x /* ERROR "incomparable types in type set" */ == x
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jan 17 19:54:25 UTC 2023
    - 511 bytes
    - Viewed (0)
  5. test/fixedbugs/issue11737.go

    // Issue 11737 - invalid == not being caught until generated switch code was compiled
    
    package p
    
    func f()
    
    func s(x interface{}) {
    	switch x {
    	case f: // ERROR "invalid case f \(type func\(\)\) in switch \(incomparable type\)|can only be compared to nil"
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Feb 04 23:42:25 UTC 2022
    - 437 bytes
    - Viewed (0)
  6. src/net/http/http.go

    import (
    	"io"
    	"strconv"
    	"strings"
    	"time"
    	"unicode/utf8"
    
    	"golang.org/x/net/http/httpguts"
    )
    
    // incomparable is a zero-width, non-comparable type. Adding it to a struct
    // makes that struct also non-comparable, and generally doesn't add
    // any size (as long as it's first).
    type incomparable [0]func()
    
    // maxInt64 is the effective "infinite" value for the Server and
    // Transport's byte-limiting readers.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jan 10 03:29:50 UTC 2024
    - 5.1K bytes
    - Viewed (0)
  7. src/cmd/compile/internal/types/alg.go

    	return AlgType(t) == ANOALG
    }
    
    // IsComparable reports whether t is a comparable type.
    func IsComparable(t *Type) bool {
    	a := AlgType(t)
    	return a != ANOEQ && a != ANOALG
    }
    
    // IncomparableField returns an incomparable Field of struct Type t, if any.
    func IncomparableField(t *Type) *Field {
    	for _, f := range t.Fields() {
    		if !IsComparable(f.Type) {
    			return f
    		}
    	}
    	return nil
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 18 15:30:00 UTC 2024
    - 2.4K bytes
    - Viewed (0)
  8. src/internal/types/testdata/spec/comparable.go

    package p
    
    func f1[_ comparable]()              {}
    func f2[_ interface{ comparable }]() {}
    
    type T interface{ m() }
    
    func _[P comparable, Q ~int, R any]() {
    	_ = f1[int]
    	_ = f1[T /* T does satisfy comparable */]
    	_ = f1[any /* any does satisfy comparable */]
    	_ = f1[P]
    	_ = f1[Q]
    	_ = f1[R /* ERROR "R does not satisfy comparable" */]
    
    	_ = f2[int]
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jan 17 19:54:25 UTC 2023
    - 680 bytes
    - Viewed (0)
  9. src/cmd/go/testdata/mod/example.com_retract_incompatible_v2.0.0+incompatible.txt

    The v1.0.0 release of example.com/retract/incompatible retracts
    v2.0.0+incompatible.
    
    -- .mod --
    module example.com/retract/incompatible
    -- .info --
    {"Version":"v2.0.0+incompatible"}
    -- incompatible.go --
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Nov 20 16:23:19 UTC 2020
    - 226 bytes
    - Viewed (0)
  10. src/cmd/go/testdata/mod/rsc.io_breaker_v2.0.0+incompatible.txt

    rsc.io/breaker v2.0.0+incompatible
    written by hand
    
    -- .mod --
    module rsc.io/breaker
    -- .info --
    {"Version":"v2.0.0+incompatible", "Name": "7307b307f4f0dde421900f8e5126fadac1e13aed", "Short": "7307b307f4f0"}
    -- breaker.go --
    package breaker
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jul 19 18:15:13 UTC 2018
    - 255 bytes
    - Viewed (0)
Back to top