Skip to content

Commit 623a4f8

Browse files
committed
add a note to AbstractRange requiring step
1 parent 1f3f756 commit 623a4f8

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

base/range.jl

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -253,10 +253,13 @@ end
253253
## 1-dimensional ranges ##
254254

255255
"""
256-
AbstractRange{T}
256+
AbstractRange{T} <: AbstractVector{T}
257257
258-
Supertype for ranges with elements of type `T`.
259-
[`UnitRange`](@ref) and other types are subtypes of this.
258+
Supertype for linear ranges with elements of type `T`.
259+
[`UnitRange`](@ref), [`LinRange`](@ref) and other types are subtypes of this.
260+
261+
All subtypes must define [`step`](@ref).
262+
Thus [`LogRange`](@ref Base.LogRange) is not a subtype of `AbstractRange`.
260263
"""
261264
abstract type AbstractRange{T} <: AbstractArray{T,1} end
262265

0 commit comments

Comments
 (0)