Skip to content

Commit

Permalink
Document that Length parameter needs Julia 1.7 (JuliaLang#45961)
Browse files Browse the repository at this point in the history
* Document that `L`ength parameter needs Julia 1.7

vtjnash added the 4th type parameter `L` in JuliaLang#41619 to `StepRangeLen`.
That addition seems to have appeared in Julia 1.7 so it should be documented as such.
I found this out the hard way because my CI for code that used `L` is failing with Julia 1.6.

Co-authored-by: Johnny Chen <[email protected]>
Co-authored-by: Keno Fischer <[email protected]>
  • Loading branch information
3 people committed Jul 8, 2022
1 parent 87558f6 commit 50627d6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions base/range.jl
Original file line number Diff line number Diff line change
Expand Up @@ -467,6 +467,9 @@ value `r[1]`, but alternatively you can supply it as the value of
`r[offset]` for some other index `1 <= offset <= len`. In conjunction
with `TwicePrecision` this can be used to implement ranges that are
free of roundoff error.
!!! compat "Julia 1.7"
The 4th type parameter `L` requires at least Julia 1.7.
"""
struct StepRangeLen{T,R,S,L<:Integer} <: AbstractRange{T}
ref::R # reference value (might be smallest-magnitude value in the range)
Expand Down

0 comments on commit 50627d6

Please sign in to comment.