julia> typ = Vararg{Any,N} where N
Vararg{Any,N} where N
julia> f(x::UnionAll) = :A
f (generic function with 1 method)
julia> f(::Type{T}) where T = :B
f (generic function with 2 methods)
julia> f(other) = :C
f (generic function with 3 methods)
julia> f(typ)
:A
julia> f(typ.body)
ERROR: TypeError: in TypeVar, in upper bound, expected Type, got Vararg{Any,N} where N
Stacktrace:
[1] top-level scope at REPL[6]:1
why VarArg is not able to dispatch? however if I fo f(::Type) = :B , it will work.