Bug 15818 – Multiple function declarations without definition cause ambiguity overloading error

Status
RESOLVED
Resolution
FIXED
Severity
minor
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2016-03-21T18:09:28Z
Last change time
2019-06-28T13:00:05Z
Keywords
pull, rejects-valid
Assigned to
No Owner
Creator
Denis Shelomovskii

Comments

Comment #0 by verylonglogin.reg — 2016-03-21T18:09:28Z
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.
Comment #1 by dlang-bot — 2019-06-23T19:38:02Z
@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
Comment #2 by dlang-bot — 2019-06-28T13:00:05Z
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