Skip to content

Commit

Permalink
Remove implementation doctest
Browse files Browse the repository at this point in the history
This doctest is bad, because it tests the internal representation of
the macro, not its behavior. With the additional features added to
the macro, the expansion is no longer as simple, so remove the test.
  • Loading branch information
Keno committed Jan 21, 2025
1 parent 6d1cc47 commit 3a84d5f
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions base/reflection.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1393,23 +1393,6 @@ It also supports the following syntax:
(as well as `f` itself if it is not a literal global) will be evaluated
in the current world age.
```jldoctest
julia> @macroexpand @invokelatest f(x; kw=kwv)
:(Base.invokelatest(f, x; kw = kwv))
julia> @macroexpand @invokelatest x.f
:(Base.invokelatest(Base.getproperty, x, :f))
julia> @macroexpand @invokelatest x.f = v
:(Base.invokelatest(Base.setproperty!, x, :f, v))
julia> @macroexpand @invokelatest xs[i]
:(Base.invokelatest(Base.getindex, xs, i))
julia> @macroexpand @invokelatest xs[i] = v
:(Base.invokelatest(Base.setindex!, xs, v, i))
```
!!! compat "Julia 1.7"
This macro requires Julia 1.7 or later.
Expand Down

0 comments on commit 3a84d5f

Please sign in to comment.