I removed the parameter from the definition and call sites.
I went from
void foo(A a, B b) {
// Only use a
}
...
foo(x, y);
To this void foo(A a) {
// Only use a
}
...
foo(x);
And it stopped compiling. There were no other functions called `foo` so it is nothing to do with overloading.I'll give you the answer if you want or we can leave it a mystery so you can experience how confusing that behaviour is...