julia> eltype( Dict( :x => 1, :y => 2 ) )[1]
ERROR: MethodError: `convert` has no method matching convert(::Type{Pair{
Symbol,Int64}}, ::Int64)
This may have arisen from a call to the constructor Pair{Symbol,Int64}(...),
since type constructors fall back to convert methods.
Closest candidates are:
  Pair{A,B}(::Any, ::Any)
  call{T}(::Type{T}, ::Any)
  convert{T}(::Type{T}, ::T)
 in getindex at array.jl:167


Is this intentional ? This breaks a package I am dependent on - I believe 
the assumption was that Pair would respect the tuple API, this appears to 
not be the case ? 

collect( eltype( Dict( :x => 1, :y => 2 ) ) )
ERROR: MethodError: `start` has no method matching start(::Type{Pair{Symbol,
Int64}})
 in collect at array.jl:255
 in collect at array.jl:262


Reply via email to