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 dict replcompletion error without key #28352

Merged
merged 1 commit into from
Jul 30, 2018

Conversation

pfitzseb
Copy link
Member

This fixes an error triggered by trying to autocomplete in a Dicts getindex call.

Before:

julia> foo = Dict(:bar => 3)
Dict{Symbol,Int64} with 1 entry:
  :bar => 3

julia> foo[┌ Error: Error in the keymap
│   exception =
│    MethodError: no method matching iterate(::Nothing)
│    Closest candidates are:
│      iterate(::Any) at essentials.jl:821
│      iterate(::Any, ::Any) at essentials.jl:816
│      iterate(::Core.SimpleVector) at essentials.jl:552
│      ...
│    Stacktrace:
│     [1] start(::Nothing) at ./essentials.jl:843
│     [2] iterate at ./essentials.jl:821 [inlined]
│     [3] first(::Nothing) at ./abstractarray.jl:287
│     [4] dict_identifier_key(::String, ::Symbol) ...

After:

julia> foo = Dict(:bar => 3)
Dict{Symbol,Int64} with 1 entry:
  :bar => 3

julia> foo[
!                        Channel                   TypeError                 delete!                   isabstract                numerator                 size
!=                       Char                      TypeVar                   deleteat!                 isabstracttype            object_id                 sizehint!
!==                      Cint                      UInt                      denominator               isalnum                   objectid                  sizeof
%                        Cintmax_t                 UInt128                   detach                    isalpha                   occursin      
...

@pfitzseb
Copy link
Member Author

Mac FileWatching issue seems unrelated.

@KristofferC KristofferC added the bugfix This change fixes an existing bug label Jul 30, 2018
@KristofferC KristofferC merged commit 0fb00c9 into JuliaLang:master Jul 30, 2018
@pfitzseb pfitzseb deleted the sp/replcompletion_dict branch July 30, 2018 21:49
@StefanKarpinski
Copy link
Member

Mac issue is likely #26725.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix This change fixes an existing bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants