If you, for some reason, want to have dictionary with duplicate keys you can use Base.ImmutableDict
(which is however a bit tricky to use):
julia> a = Base.ImmutableDict(Base.ImmutableDict(Pair(:x, 1)), Pair(:x, 2))
Base.ImmutableDict{Symbol,Int64} with 2 entries:
:x => 2
:x => 1
Note that adding a new value with the same key will override the initial definition, so
julia> a[:x]
2