How to dispatch on an SVector?

What’s happening?

julia> g(x::Union{Vector, SVector}) = x
g (generic function with 1 method)

julia> g(SVector(1,1,1))
3-element SVector{3, Int64} with indices SOneTo(3):
 1
 1
 1

(you may want AbstractVector instead of the Union)