andyferris / Dictionaries.jl

An alternative interface for dictionaries in Julia, for improved productivity and performance
Other
278 stars 28 forks source link

`deepcopy` broken after calling `delete!`. #133

Closed nhz2 closed 5 months ago

nhz2 commented 5 months ago

Here is an example:

julia> using Dictionaries

julia> d = Dictionary(1:4, 1:4)
4-element Dictionary{Int64, Int64}
 1 │ 1
 2 │ 2
 3 │ 3
 4 │ 4

julia> delete!(d, 2)
3-element Dictionary{Int64, Int64}
 1 │ 1
 3 │ 3
 4 │ 4

julia> deepcopy(d)
3-element Dictionary{Int64, Int64}
 1 │ 1
 3 │ 2
 4 │ 3

julia> d == deepcopy(d)
false