julia> f(x::T, y::T, z::S) where {S,T<:Vector{S}} = "method 1"
f (generic function with 1 method)
julia> f(x::T, z::S, y::T) where {S,T<:Vector{S}} = "method 2"
ERROR: StackOverflowError:
Stacktrace:
[1] top-level scope at REPL[2]:1
julia> methods(f)
# 2 methods for generic function "f":
[1] f(x::T, y::T, z::S) where {S, T<:Array{S,1}} in Main at REPL[1]:1
[2] f(x::T, z::S, y::T) where {S, T<:Array{S,1}} in Main at REPL[2]:1
julia> f([1,2],1,[1,2])
"method 2"
julia> f([1,2],[1,2],1)
"method 1"