The => is special here for the parser. What you want is
(Int=>Dict{Int, Int})[ ]

However, it's possible your alternative syntax could be made to work.

On Thursday, May 1, 2014, thom lake <[email protected]> wrote:

> Both of these work
>
> julia> Dict{Int,Int}()
> Dict{Int64,Int64}()
>
> julia> (Int=>Int)[]
> Dict{Int64,Int64}()
>
> So does this
>
> julia> Dict{Int,Dict{Int,Int}}()
> Dict{Int64,Dict{Int64,Int64}}()
>
> This doesn't
>
> julia> (Int=>(Int=>Int))[]
> ERROR: unsupported or misplaced expression =>
>
> Any particular reason? Am I doing something silly?
>
>

Reply via email to