Equality of empty ranges

In order to be equal, ranges need to have the same first element, last element, and step, even if they are empty. In my opinion, this is unintuitive:

julia> 2:1 == 1:0

It also breaks the transitivity of ==:

julia> 2:1 == Int[] == 1:0

Is this behavior intentional? (And if it is, what is the intention?)

That does seem like a bit of a problem; could you open a GitHub issue?

I have opened an issue:

1 Like

Thank you!