Skip to content

Commit

Permalink
invokelatest docs should say not exported before 1.9 (#50341)
Browse files Browse the repository at this point in the history
  • Loading branch information
stevengj authored Jun 29, 2023
1 parent cf34aa2 commit cb6d0f2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 3 additions & 0 deletions base/essentials.jl
Original file line number Diff line number Diff line change
Expand Up @@ -857,6 +857,9 @@ e.g. long-running event loops or callback functions that may
call obsolete versions of a function `f`.
(The drawback is that `invokelatest` is somewhat slower than calling
`f` directly, and the type of the result cannot be inferred by the compiler.)
!!! compat "Julia 1.9"
Prior to Julia 1.9, this function was not exported, and was called as `Base.invokelatest`.
"""
function invokelatest(@nospecialize(f), @nospecialize args...; kwargs...)
kwargs = merge(NamedTuple(), kwargs)
Expand Down
5 changes: 4 additions & 1 deletion base/reflection.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2157,7 +2157,7 @@ end
"""
@invokelatest f(args...; kwargs...)
Provides a convenient way to call [`Base.invokelatest`](@ref).
Provides a convenient way to call [`invokelatest`](@ref).
`@invokelatest f(args...; kwargs...)` will simply be expanded into
`Base.invokelatest(f, args...; kwargs...)`.
Expand Down Expand Up @@ -2187,6 +2187,9 @@ julia> @macroexpand @invokelatest xs[i] = v
!!! compat "Julia 1.7"
This macro requires Julia 1.7 or later.
!!! compat "Julia 1.9"
Prior to Julia 1.9, this macro was not exported, and was called as `Base.@invokelatest`.
!!! compat "Julia 1.10"
The additional syntax is supported as of Julia 1.10.
"""
Expand Down

0 comments on commit cb6d0f2

Please sign in to comment.