From cb6d0f2e53004c4a98988dcb8b89048026eecff9 Mon Sep 17 00:00:00 2001 From: "Steven G. Johnson" Date: Thu, 29 Jun 2023 02:45:08 -0400 Subject: [PATCH] invokelatest docs should say not exported before 1.9 (#50341) --- base/essentials.jl | 3 +++ base/reflection.jl | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/base/essentials.jl b/base/essentials.jl index 0477ccd5b172a..97f32483a6b14 100644 --- a/base/essentials.jl +++ b/base/essentials.jl @@ -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) diff --git a/base/reflection.jl b/base/reflection.jl index 5268beddeb8eb..02a927ba7b265 100644 --- a/base/reflection.jl +++ b/base/reflection.jl @@ -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...)`. @@ -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. """