Skip to content

Commit

Permalink
Do not trigger deprecation warnings (#89)
Browse files Browse the repository at this point in the history
  • Loading branch information
t-bltg authored Dec 20, 2022
1 parent 7da693b commit ee45d35
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/exports.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
function walkmodules(f, x::Module)
f(x)
for n in names(x; all=true)
if isdefined(x, n)
for n in names(x; all = true)
# `isdefined` and `getproperty` can trigger deprecation warnings
if Base.isbindingresolved(x, n) && !Base.isdeprecated(x, n)
isdefined(x, n) || continue
y = getproperty(x, n)
if y isa Module && y !== x && parentmodule(y) === x
walkmodules(f, y)
Expand Down

0 comments on commit ee45d35

Please sign in to comment.