Unfortunately you can’t without resorting to traits or whatever (which doesn’t help you if you don’t own the function being overloaded). There’s an open issue for it here: Dispatch on a type being anywhere in a signature · Issue #39878 · JuliaLang/julia · GitHub
1 Like