Cannot use parametric type within function body

To be a full mwe you should add using LinearAlgebra and define a test Vector of Symmetric matrix, so we don’t all have to do that.

But without testing it, you probably need another <:

function alt(x::Vector{<:Symmetric{T}}) where {T <: Real}
    return T
end
1 Like