It’s just a type parameter, not a parametric type. The method’s where clause doesn’t actually belong to any of the type annotations, but even if we do incorporate it, the bare parameter does not make a UnionAll:
julia> (Type{F} where F<:Function)
Type{F} where F<:Function
julia> (Type{F} where F<:Function) |> typeof
UnionAll
julia> (F where F<:Function)
Function
julia> (F where F<:Function) |> typeof
DataType
In actuality, the method’s where clause belongs to the method signature’s tuple type:
julia> (f::MyType{F})(x::F) where F<:Function = 0
julia> methods(MyType(+))[1].sig
Tuple{MyType{F}, F} where F<:Function
And it’s possible to annotate bare parameters for arguments for such a type. It’s just not supported for callables, and I can’t find compelling reasons for or against it. (callable::T)(data::T) where T<:AbstractCallableData sounds like a neat bonus feature.
This changes the callable from the instances to the MyFunc subtypes, making a method that mingles with the constructors. I’d avoid that.
Could just do typeof(f) in method 1, it’s simple enough to do at compile-time.