Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix invalidations in REPL LineEdit.jl from Static.jl #46548

Merged
merged 2 commits into from
Aug 31, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
apply suggestion of KristofferC
  • Loading branch information
ranocha committed Aug 31, 2022
commit 1479602651c91e223d0b7c04fd236562b17d1455
6 changes: 3 additions & 3 deletions stdlib/REPL/src/LineEdit.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1548,7 +1548,7 @@ function normalize_keys(keymap::Union{Dict{Char,Any},AnyDict})
return ret
end

function add_nested_key!(keymap::Dict, key::Union{String, Char}, value; override::Bool = false)
function add_nested_key!(keymap::Dict{Char, Any}, key::Union{String, Char}, value; override::Bool = false)
y = iterate(key)
while y !== nothing
c, i = y
Expand All @@ -1560,10 +1560,10 @@ function add_nested_key!(keymap::Dict, key::Union{String, Char}, value; override
if y === nothing
keymap[c] = value
break
elseif !((c in keys(keymap))::Bool && isa(keymap[c], Dict))
elseif !(c in keys(keymap) && isa(keymap[c], Dict))
keymap[c] = Dict{Char,Any}()
end
keymap = keymap[c]
keymap = keymap[c]::Dict{Char, Any}
end
end

Expand Down