This is in the Julia FAQ:
You can solve this problem with something like
foo(bar::Vector{T}) where {T<:Real}(or the short formfoo(bar::Vector{<:Real})if the static parameterTis not needed in the body of the function).
See the FAQ and the linked sections of the manual for more explanation.