If I have, say, abstract Component and want a vector of any of its subtype types, how should I specify Vector's type parameter? This naive snippet doesn't work:
type Position<:Component
x::Real
y::Real
end
v = Vector{Type{Component}}
push!(v, Position)
ERROR: MethodError: `push!` has no method matching push (::Type{Array{Type{Component},1}}, ::Type{Position})
Closest candidates are:
push!(::Any, ::Any, ::Any)
push!(::Any, ::Any, ::Any, ::Any...)
push!(::Array{Any,1}, ::ANY)