Open matthias314 opened 3 weeks ago
I don't think this is fixable without being somewhat breaking, see https://github.com/JuliaLang/julia/pull/30950
I'm not so sure. My understanding is that #30950 is about some weird results when broadcasting over 1-element arrays. For the moment I've looked more closely at comparisons of ranges. I don't see why this couldn't be changed, but of course I might miss something. To get a better idea, I've created the PR #54825. Maybe this way one can see better what would happen with such a change.
The code in range.jl was presumably written under the assumption that all ranges (or all arrays) are 1-based. With
IdentityUnitRange
, this is not true anymore, and this leads to problems. I have found the following issues: Forone gets:
This happens with Julia 1.10.4, 1.11.0-beta2 and master.
EDIT: I've just noticed that while
IdentityUnitRange
has a docstring, it is not mentioned in the documentation. Maybe it is considered internal.