Function with vector of Union-Type

I think it’s due to the invariance of Julia type parameters: Vector{Union{<:Number,Missing}} is not a Vector{Missing,Int64}. You probably want the type signature of _foo2() to be:

function _foo2(_range::Vector{<:Union{<:Number,Missing}})
1 Like