Pull request submitted https://github.com/JuliaLang/julia/pull/12931
On Thursday, September 3, 2015 at 9:02:33 AM UTC-4, Michael Francis wrote: > > 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 > > >