Is there any way to force the multiple dispatch system to use certain method instead of the less ambiguous one?
Here is a naive example
abstract type MyAbstract end
struct MyType1 <: MyAbstract
x::Int
end
struct MyType2 <: MyAbstract
x::Float64
end
function foo(x::MyAbstract, y::MyAbstract)
MyType2(x.x + x.y)
end
function foo(x::T, y::T) where T<:MyAbstract
print("They were the same type!")
foo(x::MyAbstract, y::MyAbstract) # This doesn't work yet
end
Thanks!