If this is really the only problem, just use a union type:
const MyTypeFoo = Union{MyType{Foo},MyType{<:FooBarBaz,Foo}}
f(x::MyTypeFoo) = 5
(As originally suggested by @uniment!)
If this is really the only problem, just use a union type:
const MyTypeFoo = Union{MyType{Foo},MyType{<:FooBarBaz,Foo}}
f(x::MyTypeFoo) = 5
(As originally suggested by @uniment!)