You can write f(x::@?(Int), y::Int) = x+y with tkf’s clever macro, from this earlier discussion:
f(x::@?(Int), y::Int) = x+y