Skip to content

Commit

Permalink
also filter on isbindingresolved
Browse files Browse the repository at this point in the history
  • Loading branch information
ajwheeler committed Dec 4, 2024
1 parent 2224a0e commit 00d5181
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions stdlib/REPL/src/REPL.jl
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ function _UndefVarError_warnfor(io::IO, modules, var::Symbol)
# the parentmodule in which the variable is defined
to_warn_about = Dict{Module, Vector{Module}}()
for m in modules
# only warn if exported or public TODO why did this used to check isbindingresolved?
if !Base.isexported(m, var) && !Base.ispublic(m, var)
# only warn if binding is resolved and exported or public

Check warning on line 80 in stdlib/REPL/src/REPL.jl

View workflow job for this annotation

GitHub Actions / Check whitespace

Whitespace check

trailing whitespace
if !Base.isbindingresolved(m, var) || (!Base.isexported(m, var) && !Base.ispublic(m, var))
continue
end
warned = true
Expand Down Expand Up @@ -109,7 +109,7 @@ function _UndefVarError_warnfor(io::IO, modules, var::Symbol)
end
print(io, "\n - Also $how_available $m")
if !isdefined(active_mod, Symbol(m))
print(io, ", which would need to be imported in $active_mod")
print(io, " (loaded but not imported in $active_mod)")
end
print(io, ".")
end
Expand Down

0 comments on commit 00d5181

Please sign in to comment.