When you find yourself in a situation where you can use a type, but not any of its subtypes, you can often use it by entering the type parameter in the right place. The following seems to work:
abstract Component
type Position<:Component
x::Real
y::Real
end
typealias ComponentType{T<:Component} Type{T}
v = Vector{ComponentType}()
push!(v, Position)
Note that we have created a new type ComponentTypeto which any subtype Component(including Component) belongs , using the type parameter with a construction typealias.
, , , , , v = Vector(); , Julia - .