Skip to content

Commit 751a0d7

Browse files
authored
docs: fix-up world-age handling for META access (#57349)
This should be enough to get rid of the 3 lingering warnings in our main test suite.
1 parent 5343130 commit 751a0d7

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

Diff for: base/docs/Docs.jl

+4-4
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,8 @@ const META = gensym(:meta)
7575
const METAType = IdDict{Any,Any}
7676

7777
function meta(m::Module; autoinit::Bool=true)
78-
if !isdefinedglobal(m, META)
79-
return autoinit ? invokelatest(initmeta, m) : nothing
78+
if !invokelatest(isdefinedglobal, m, META)
79+
return autoinit ? initmeta(m) : nothing
8080
end
8181
# TODO: This `invokelatest` is not technically required, but because
8282
# of the automatic constant backdating is currently required to avoid
@@ -85,13 +85,13 @@ function meta(m::Module; autoinit::Bool=true)
8585
end
8686

8787
function initmeta(m::Module)
88-
if !isdefinedglobal(m, META)
88+
if !invokelatest(isdefinedglobal, m, META)
8989
val = METAType()
9090
Core.eval(m, :(const $META = $val))
9191
push!(modules, m)
9292
return val
9393
end
94-
return getglobal(m, META)
94+
return invokelatest(getglobal, m, META)
9595
end
9696

9797
function signature!(tv::Vector{Any}, expr::Expr)

Diff for: test/testhelpers/OffsetDenseArrays.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ function Base.setindex(x::OffsetDenseArray, v, i::Integer)
2424
x.x[i - x.offset] = v
2525
end
2626

27-
IndexStyle(::Type{<:OffsetDenseArray}) = Base.IndexLinear()
27+
Base.IndexStyle(::Type{<:OffsetDenseArray}) = Base.IndexLinear()
2828
Base.axes(x::OffsetDenseArray) = (x.offset + 1 : x.offset + length(x.x),)
2929
Base.keys(x::OffsetDenseArray) = only(axes(x))
3030

0 commit comments

Comments
 (0)