Just wondering if this is expected - ie. is the combination of eval and 
comprehension unable to cope?

function test()
    a1 = [:a=>1, :b=>2]
    println(typeof(eval(a1))) # Dict{Symbol,Int64}
    println(typeof(Dict(collect(a1)))) # Dict{Symbol,Int64}
    println(typeof(Dict(collect(eval(a1))))) # Dict{Symbol,Int64}
    println(typeof(Dict([(s,n) for (s,n) in a1]))) # Dict{Symbol,Int64}
    
    println(typeof(Dict([(s,n) for (s,n) in eval(a1)]))) # Dict{*Any,Any*} 
-- oops!
end


Reply via email to