Actually I could do:

function f2{T}(t, a::Vector{T})
    Dict{T, code_typed(t, (T,))[1].rettype}((x, t(x)) for x in a)
end

but this does not solve the problem as the compiler still is unable to 
determine the exact return type of f2.

On Monday, November 14, 2016 at 4:06:20 PM UTC+1, Lutfullah Tomak wrote:
>
> You could find `ta=t.(a)` first and then construct a 
> `Dict{eltype(a),eltype(ta)}` but it is just a workaround and wastes some 
> memory.

Reply via email to