- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 11 for IsComparable (0.16 sec)
-
guava-tests/test/com/google/common/base/PredicatesTest.java
@GwtIncompatible // Predicates.instanceOf public void testIsInstanceOf_interface() { Predicate<@Nullable Object> isComparable = Predicates.instanceOf(Comparable.class); assertTrue(isComparable.apply(1)); assertTrue(isComparable.apply(2.0f)); assertTrue(isComparable.apply("")); assertFalse(isComparable.apply(null)); } @GwtIncompatible // Predicates.instanceOf public void testIsInstanceOf_equality() {
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Thu Feb 22 17:15:24 UTC 2024 - 32.4K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/base/PredicatesTest.java
@GwtIncompatible // Predicates.instanceOf public void testIsInstanceOf_interface() { Predicate<@Nullable Object> isComparable = Predicates.instanceOf(Comparable.class); assertTrue(isComparable.apply(1)); assertTrue(isComparable.apply(2.0f)); assertTrue(isComparable.apply("")); assertFalse(isComparable.apply(null)); } @GwtIncompatible // Predicates.instanceOf public void testIsInstanceOf_equality() {
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Thu Feb 22 17:15:24 UTC 2024 - 32.4K bytes - Viewed (0) -
src/go/types/typeset.go
// IsMethodSet reports whether the interface t is fully described by its method set. func (s *_TypeSet) IsMethodSet() bool { return !s.comparable && s.terms.isAll() } // IsComparable reports whether each type in the set is comparable. func (s *_TypeSet) IsComparable(seen map[Type]bool) bool { if s.terms.isAll() { return s.comparable } return s.is(func(t *term) bool { return t != nil && comparable(t.typ, false, seen, nil) }) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 19:19:55 UTC 2024 - 13.7K bytes - Viewed (0) -
src/cmd/compile/internal/types2/typeset.go
// IsMethodSet reports whether the interface t is fully described by its method set. func (s *_TypeSet) IsMethodSet() bool { return !s.comparable && s.terms.isAll() } // IsComparable reports whether each type in the set is comparable. func (s *_TypeSet) IsComparable(seen map[Type]bool) bool { if s.terms.isAll() { return s.comparable } return s.is(func(t *term) bool { return t != nil && comparable(t.typ, false, seen, nil) }) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 19:19:55 UTC 2024 - 13.6K bytes - Viewed (0) -
src/cmd/compile/internal/typecheck/expr.go
converted := false if r.Type().Kind() != types.TBLANK { aop, _ = assignOp(l.Type(), r.Type()) if aop != ir.OXXX { if r.Type().IsInterface() && !l.Type().IsInterface() && !types.IsComparable(l.Type()) { base.Errorf("invalid operation: %v (operator %v not defined on %s)", n, op, typekind(l.Type())) return l, r, nil } types.CalcSize(l.Type())
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Apr 04 14:29:45 UTC 2024 - 23.1K bytes - Viewed (0) -
src/cmd/compile/internal/typecheck/stmt.go
var nilonly string if t != nil { switch { case t.IsMap(): nilonly = "map" case t.Kind() == types.TFUNC: nilonly = "func" case t.IsSlice(): nilonly = "slice" case !types.IsComparable(t): if t.IsStruct() { base.ErrorfAt(n.Pos(), errors.InvalidExprSwitch, "cannot switch on %L (struct containing %v cannot be compared)", n.Tag, types.IncomparableField(t).Type) } else {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Nov 20 15:10:54 UTC 2023 - 17.8K bytes - Viewed (0) -
src/go/types/instantiate.go
*cause = check.sprintf("%s does not %s %s %s", V, verb, T, *cause) } return false } // Only check comparability if we don't have a more specific error. checkComparability := func() bool { if !Ti.IsComparable() { return true } // If T is comparable, V must be comparable. // If V is strictly comparable, we're done. if comparable(V, false /* strict comparability */, nil, nil) { return true }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 03:01:18 UTC 2024 - 12.8K bytes - Viewed (0) -
api/go1.18.txt
pkg go/types, func NewUnion([]*Term) *Union pkg go/types, method (*ArgumentError) Error() string pkg go/types, method (*ArgumentError) Unwrap() error pkg go/types, method (*Interface) IsComparable() bool pkg go/types, method (*Interface) IsImplicit() bool pkg go/types, method (*Interface) IsMethodSet() bool pkg go/types, method (*Interface) MarkImplicit() pkg go/types, method (*Named) Origin() *Named
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Feb 17 20:31:46 UTC 2023 - 13K bytes - Viewed (0) -
src/cmd/compile/internal/types2/instantiate.go
*cause = check.sprintf("%s does not %s %s %s", V, verb, T, *cause) } return false } // Only check comparability if we don't have a more specific error. checkComparability := func() bool { if !Ti.IsComparable() { return true } // If T is comparable, V must be comparable. // If V is strictly comparable, we're done. if comparable(V, false /* strict comparability */, nil, nil) { return true }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 03:01:18 UTC 2024 - 12.7K bytes - Viewed (0) -
src/go/types/predicates.go
if reportf != nil { reportf("%s cannot be compared", t) } return false } return true case *Interface: if dynamic && !isTypeParam(T) || t.typeSet().IsComparable(seen) { return true } if reportf != nil { if t.typeSet().IsEmpty() { reportf("empty type set") } else { reportf("incomparable types in type set") } } // fallthrough
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 03:01:18 UTC 2024 - 17.6K bytes - Viewed (0)