Skip to content

Commit 21d33b4

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 9ca08e9 commit 21d33b4

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
@@ -1335,7 +1335,11 @@ Usually `begin` will not be necessary, since keywords such as [`function`](@ref)
13351335
implicitly begin blocks of code. See also [`;`](@ref).
13361336
13371337
`begin` may also be used when indexing to represent the first index of a
1338-
collection or the first index of a dimension of an array.
1338+
collection or the first index of a dimension of an array. For example,
1339+
`a[begin]` is the first element of an array `a`.
1340+
1341+
!!! compat "Julia 1.6"
1342+
Use of `begin` as an index requires Julia 1.6 or later.
13391343
13401344
# Examples
13411345
```jldoctest

0 commit comments

Comments
 (0)