call{T}(::Type{Foo{T}}) = Foo{T}(T[])

julia> Foo{Float64}()
Foo{Float64}(Float64[])



On Tuesday, April 5, 2016 at 1:12:00 PM UTC+2, Anonymous wrote:
>
> I couldn't really figure out a good way to describe it my title, but what 
> I'm trying to do is this:
>
> type Foo{T}
> x::Vector{T}
> end
>
> Foo{T}() = Foo{T}(T[])
>
> but I get the warning msg: Warning: static parameter T does not occur in 
> signature for call at none:1.  The method will not be callable.
>
> How can I do this?
>
>

Reply via email to