This code should compile: --- void f(int); // line 1 void f(int); void f(int); void f(int); void f(int); // line 5 void main() { f(1); // line 9 } --- main.d(9): Error: main.f called with argument types (int) matches both: main.d(1): main.f(int) and: main.d(5): main.f(int) --- If any declaration is converted to definition the code compiles. Also note the error message only reports about the first and the last declaration.
@Basile-z created dlang/dmd pull request #10077 "fix issue 15818 - Multiple function declarations without definition cause ambiguity overloading error" fixing this issue: - fix issue 15818 - Multiple function declarations without definition cause ambiguity overloading error https://github.com/dlang/dmd/pull/10077
dlang/dmd pull request #10077 "fix issue 15818 - Multiple function declarations without definition cause ambiguity overloading error" was merged into master: - fd3a47eba1b20ca582af42359394d7a51395bd04 by Basile Burg: fix issue 15818 - Multiple function declarations without definition cause ambiguity overloading error https://github.com/dlang/dmd/pull/10077