Yup, this is one of the quirkier things about parametric types. You need to echo the inner constructor as an outer constructor.
— John On Feb 4, 2014, at 7:37 PM, milktrader <[email protected]> wrote: > julia> immutable Foo{T,N} > x::Vector{Int} > y::Array{T,N} > z::Vector{ASCIIString} > > function Foo(x::Vector{Int}, y::Array{T,N}, z::Vector{ASCIIString}) > new(x,y,z) > end > > end > > julia> foo = Foo([1], [2], ["bar"]) > ERROR: no method Foo{T,N}(Array{Int64,1}, Array{Int64,1}, > Array{ASCIIString,1}) > > Without the inner constructor, an object is created no problem.
