Skip to content

Commit

Permalink
Fix MethodError when warning about a toplevel module (#52782)
Browse files Browse the repository at this point in the history
  • Loading branch information
staticfloat committed Jan 6, 2024
1 parent c827094 commit 0cb5a0e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion base/loading.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2022,7 +2022,10 @@ function warn_if_already_loaded_different(uuidkey::PkgId)
end
end
@warn warnstr
push!(already_warned_path_change_pkgs, uuidkey.uuid)
# Toplevel modules have a `uuid` of `Nothing`
if uuidkey.uuid !== nothing
push!(already_warned_path_change_pkgs, uuidkey.uuid)
end
end
end
end
Expand Down

0 comments on commit 0cb5a0e

Please sign in to comment.