- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 1,773 for compared (0.12 sec)
-
test/cmp6.go
use(t3 == t3) // ERROR "struct|expected|cannot compare" use(t4 == t4) // ERROR "cannot be compared|non-comparable|cannot compare" // Slices, functions, and maps too. var x []int var f func() var m map[int]int use(x == x) // ERROR "slice can only be compared to nil|cannot compare" use(f == f) // ERROR "func can only be compared to nil|cannot compare" use(m == m) // ERROR "map can only be compared to nil|cannot compare"
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Dec 01 21:49:31 UTC 2020 - 2.2K bytes - Viewed (0) -
test/switch3.go
switch m { case nil: case m1: // ERROR "can only compare map m to nil|map can only be compared to nil|cannot compare" default: } var a, a1 []int switch a { case nil: case a1: // ERROR "can only compare slice a to nil|slice can only be compared to nil|cannot compare" default: } var f, f1 func() switch f { case nil: case f1: // ERROR "can only compare func f to nil|func can only be compared to nil|cannot compare"
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Dec 15 19:43:32 UTC 2020 - 1.2K bytes - Viewed (0) -
src/internal/types/testdata/check/expr2.go
// issue #28164 // testcase from issue _ = interface{}(nil) == [ /* ERROR "slice can only be compared to nil" */ ]int(nil) // related cases var e interface{} var s []int var x int _ = e == s // ERROR "slice can only be compared to nil" _ = s /* ERROR "slice can only be compared to nil" */ == e _ = e /* ERROR "operator < not defined on interface" */ < x
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Jan 17 19:54:27 UTC 2023 - 5K bytes - Viewed (0) -
platforms/core-execution/execution/src/main/java/org/gradle/internal/execution/history/changes/SortedMapDiffUtil.java
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Fri Sep 22 09:46:15 UTC 2023 - 3.6K bytes - Viewed (0) -
src/internal/types/testdata/spec/comparisons.go
_ = b == b _ = a /* ERROR "[10]func() cannot be compared" */ == a _ = l /* ERROR "slice can only be compared to nil" */ == l _ = s /* ERROR "struct containing []byte cannot be compared" */ == s _ = p == p _ = f /* ERROR "func can only be compared to nil" */ == f _ = i == i _ = m /* ERROR "map can only be compared to nil" */ == m _ = c == c _ = b == nil /* ERROR "mismatched types" */
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Jan 17 19:54:27 UTC 2023 - 3K bytes - Viewed (0) -
src/internal/types/testdata/fixedbugs/issue50918.go
things []string } type thing2 struct { things []thing1 } func _() { var a1, b1 thing1 _ = a1 /* ERROR "struct containing []string cannot be compared" */ == b1 var a2, b2 thing2 _ = a2 /* ERROR "struct containing []thing1 cannot be compared" */ == b2
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Jan 17 19:54:27 UTC 2023 - 453 bytes - Viewed (0) -
subprojects/core-api/src/main/java/org/gradle/api/tasks/CompileClasspathNormalizer.java
*/ package org.gradle.api.tasks; /** * Normalizes file input that represents a Java compile classpath. * * Compared to the default behavior this normalizer keeps the order of any root files, * but ignores the order and timestamps of files in directories and ZIP/JAR files. * Compared to {@link ClasspathNormalizer} this normalizer only snapshots the ABIs of class files, * and ignores any non-class resource. *
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Fri Oct 05 07:18:07 UTC 2018 - 1.1K bytes - Viewed (0) -
src/maps/maps.go
// Values are compared using ==. func Equal[M1, M2 ~map[K]V, K, V comparable](m1 M1, m2 M2) bool { if len(m1) != len(m2) { return false } for k, v1 := range m1 { if v2, ok := m2[k]; !ok || v1 != v2 { return false } } return true } // EqualFunc is like Equal, but compares values using eq. // Keys are still compared with ==.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Feb 28 20:35:05 UTC 2024 - 1.8K bytes - Viewed (0) -
src/internal/types/testdata/fixedbugs/issue43110.go
case a: // no follow-on error here } // this is ok because f can be compared to nil var f func() switch f { } switch f { case nil: } switch (func())(nil) { case nil: } switch (func())(nil) { case f /* ERRORx `invalid case f in switch on .* \(func can only be compared to nil\)` */ : } switch nil /* ERROR "use of untyped nil in switch expression" */ { }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Jan 17 19:54:27 UTC 2023 - 794 bytes - Viewed (0) -
platforms/core-execution/snapshots/src/main/java/org/gradle/internal/snapshot/ChildMapFactory.java
} } static <T> ChildMap<T> childMap(CaseSensitivity caseSensitivity, ChildMap.Entry<T> entry1, ChildMap.Entry<T> entry2) { int compared = PathUtil.getPathComparator(caseSensitivity).compare(entry1.getPath(), entry2.getPath()); List<ChildMap.Entry<T>> sortedEntries = compared < 0 ? ImmutableList.of(entry1, entry2) : ImmutableList.of(entry2, entry1); return childMapFromSorted(sortedEntries);
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Fri Sep 22 09:34:50 UTC 2023 - 2.6K bytes - Viewed (0)