Skip to content

Commit 8e5d0a6

Browse files
committed
don't rely on isless to be defined on elements, use hash as fallback
1 parent c3081cd commit 8e5d0a6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ordering.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ function <ₑ(a, b)
1313
if !istree(a) && !istree(b)
1414
T = typeof(a)
1515
S = typeof(b)
16-
return T===S ? isless(a, b) : nameof(T) < nameof(S)
16+
return T===S ? (T <: Number ? isless(a, b) : hash(a) < hash(b)) : nameof(T) < nameof(S)
1717
elseif istree(b) && !istree(a)
1818
return true
1919
elseif istree(a) && istree(b)

0 commit comments

Comments
 (0)