Skip to content

Commit 93e086f

Browse files
stevengjKristofferC
authored andcommitted
compat notice for a[begin] indexing (#55197)
`a[begin]` indexing was added by #35779 in Julia 1.6, so this feature needs a compat notice in the docstring. (cherry picked from commit 43df7fb)
1 parent a02dbac commit 93e086f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

base/docs/basedocs.jl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1354,7 +1354,11 @@ Usually `begin` will not be necessary, since keywords such as [`function`](@ref)
13541354
implicitly begin blocks of code. See also [`;`](@ref).
13551355
13561356
`begin` may also be used when indexing to represent the first index of a
1357-
collection or the first index of a dimension of an array.
1357+
collection or the first index of a dimension of an array. For example,
1358+
`a[begin]` is the first element of an array `a`.
1359+
1360+
!!! compat "Julia 1.6"
1361+
Use of `begin` as an index requires Julia 1.6 or later.
13581362
13591363
# Examples
13601364
```jldoctest

0 commit comments

Comments
 (0)