Argument which is an array of the same subtypes don't match array of super-type

Types · The Julia Language has the very relevent warning

This last point is very important: even though Float64 <: Real we DO NOT have Point{Float64} <: Point{Real} .

Adapting for this case, what you want is function x1(Array{<:SuperType,1}) which can be written more simply as function x1(Vector{<:SuperType})

3 Likes