The overload being called depends on (a) whether a - b can be computed during compilation or not, and (b) the actual value of a - b. Clearly a big problem for modular code. This is the smoking gun motivating the DIP.
An very similar problem exists for int and char overloads:
alias foo = (char c) => 1; alias foo = (int i) => 4; enum int e = 7; static assert(foo(e) == 4); // fails