Skip to content

Commit

Permalink
guard against #38274 (bad choice of SSA value) in loading (#38325)
Browse files Browse the repository at this point in the history
  • Loading branch information
KristofferC committed Nov 7, 2020
1 parent f2eb09e commit 5136261
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions base/loading.jl
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@ function explicit_manifest_deps_get(project_file::String, where::UUID, name::Str
for (dep_name, entries) in d
entries::Vector{Any}
for entry in entries
entry::Dict{String, Any}
entry = entry::Dict{String, Any}
uuid = get(entry, "uuid", nothing)::Union{String, Nothing}
uuid === nothing && continue
if UUID(uuid) === where
Expand All @@ -505,7 +505,7 @@ function explicit_manifest_deps_get(project_file::String, where::UUID, name::Str
found_name = name in deps
break
else
deps::Dict{String, Any}
deps = deps::Dict{String, Any}
for (dep, uuid) in deps
uuid::String
if dep === name
Expand Down Expand Up @@ -538,7 +538,7 @@ function explicit_manifest_uuid_path(project_file::String, pkg::PkgId)::Union{No
entries = get(d, pkg.name, nothing)::Union{Nothing, Vector{Any}}
entries === nothing && return nothing # TODO: allow name to mismatch?
for entry in entries
entry::Dict{String, Any}
entry = entry::Dict{String, Any}
uuid = get(entry, "uuid", nothing)::Union{Nothing, String}
uuid === nothing && continue
if UUID(uuid) === pkg.uuid
Expand Down
2 changes: 1 addition & 1 deletion base/toml_parser.jl
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,7 @@ end

function recurse_dict!(l::Parser, d::Dict, dotted_keys::AbstractVector{String}, check=true)::Err{TOMLDict}
for i in 1:length(dotted_keys)
d::TOMLDict
d = d::TOMLDict
key = dotted_keys[i]
d = get!(TOMLDict, d, key)
if d isa Vector
Expand Down

0 comments on commit 5136261

Please sign in to comment.