JuliaLang / Compat.jl

Compatibility across Julia versions
Other
145 stars 117 forks source link

Add `union(::OneTo, ::OneTo)` #704

Closed goretkin closed 4 years ago

goretkin commented 4 years ago

I didn't bump the version number because I see there's another recent merge request.

goretkin commented 4 years ago

I think this is good to go now! Thanks for the careful review, @martinholters

martinholters commented 4 years ago

Hm, I'm having second thoughts as this changes the return type of union(::Base.OneTo, ::Base.OneTo) when Compat is loaded (on older Julia). It might be safer to instead define Compat.union to follow what Julia does in newer versions and leave Base.union alone.

In this case, I guess it's unlikely to cause any trouble (and https://github.com/JuliaLang/julia/pull/35577 doesn't seem to have) so I'm in favor of merging as is, just wanted to point out this potential for problems and give others a bit more time to chime in.

martinholters commented 4 years ago

Well, no objections voiced, so here we go...