In Julia, if T <: S, it does not follow that A{T} <: A{S} (where T and S are types, and A is a parameterized type). In particular, it is not true that Dict{String, Int} <: Dict{String, Any}.
The expression Dict("hi"=>1) creates an object of type Dict{String,Int}. To force it to create an object of type Dict{String,Any}, you need to invoke it as: Dict{String,Any}("hi" => 1).
julia> function test(t::Dict{String, <:Any})
@show t
end
test (generic function with 1 method)
julia> test(Dict("hi" => 1))
t = Dict("hi"=>1)
Dict{String,Int64} with 1 entry:
"hi" => 1
julia> function test(t::Dict{String, T}) where T
@show t
end
test (generic function with 2 methods)
julia> test(Dict("hi" => 1))
t = Dict("hi"=>1)
Dict{String,Int64} with 1 entry:
"hi" => 1