There is method call ambiguity that's why compiler error. Let's see how:
Compiler has to select most specific method to satisfy your method call.
Method selection should be so that others method also pass the
test without any bother.
Now lets check, whether m(B,B) is appropriate, (think in a way that if
m(B,B) does not exist and any one method exist individually.
#1- m(A a, B b)will do the job
#2- m(B b,A a) will also do the job
#3- m(A a,C c), will NOT pass the method call
Because test #3 fails, your method selection is not most OK.
In this way we see that none of the method is more appropriate than the
other.
How was that technique?
Thanks,