In 0.3 it was possible to get type of key and value as a tuple using 
*eltype* function as follow

julia> d = Dict{Char,Int}(['a','b'], [1,2])
Dict{Char,Int64} with 2 entries:
  'b' => 2
  'a' => 1

julia> K,V = eltype(d)
(Char,Int64)

julia> K
Char

After adding a *Tuple* type in 0.4, *eltype* returns tuple object

julia> d = Dict{Char,Int}('a'=>1, 'b'=>2)
Dict{Char,Int64} with 2 entries:
  'b' => 2
  'a' => 1

julia> eltype(d)
Tuple{Char,Int64}

julia> K,V = eltype(d)
ERROR: MethodError: `start` has no method matching 
start(::Type{Tuple{Char,Int64}})

Question is how do I get type of key or value separately?

Reply via email to