Skip to content

Commit

Permalink
add a note to AbstractRange requiring step
Browse files Browse the repository at this point in the history
  • Loading branch information
mcabbott committed Feb 7, 2024
1 parent 1f3f756 commit 623a4f8
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions base/range.jl
Original file line number Diff line number Diff line change
Expand Up @@ -253,10 +253,13 @@ end
## 1-dimensional ranges ##

"""
AbstractRange{T}
AbstractRange{T} <: AbstractVector{T}
Supertype for ranges with elements of type `T`.
[`UnitRange`](@ref) and other types are subtypes of this.
Supertype for linear ranges with elements of type `T`.
[`UnitRange`](@ref), [`LinRange`](@ref) and other types are subtypes of this.
All subtypes must define [`step`](@ref).
Thus [`LogRange`](@ref Base.LogRange) is not a subtype of `AbstractRange`.
"""
abstract type AbstractRange{T} <: AbstractArray{T,1} end

Expand Down

0 comments on commit 623a4f8

Please sign in to comment.