Bug 12983 – overload not recognized depending on order of declaration

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-06-24T18:59:00Z
Last change time
2017-07-19T17:38:54Z
Keywords
pull, rejects-valid
Assigned to
nobody
Creator
nilsbossung

Comments

Comment #0 by nilsbossung — 2014-06-24T18:59:11Z
--- cat > test.d << code alias I = int; class B(T) {alias MyC = C!string;} class C(T) : B!float { void m() {f(0);} } alias MyB = B!float; void f(); void f(I); code dmd -c -o- test.d --- test.d(5): Error: None of the overloads of 'f' are callable using argument types (int), candidates are: test.d(8): test.f() test.d(9): test.f(I) test.d(2): Error: template instance test.C!string error instantiating test.d(7): instantiated from here: B!float --- Works when f(I) is declared before f() or before MyB.
Comment #1 by nilsbossung — 2014-06-24T19:04:22Z
Possibly related to issue 12984.
Comment #2 by k.hara.pg — 2015-02-21T15:38:29Z
Comment #3 by github-bugzilla — 2015-02-27T08:02:49Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/ac443bd294103807f047ed9d74a05755f4e08f35 fix Issue 12983 - overload not recognized depending on order of declaration https://github.com/D-Programming-Language/dmd/commit/dc11b92c6a3dce3f041e665c721cc83f5c0f5086 Merge pull request #4430 from 9rnsr/fix12983 Issue 12983 - overload not recognized depending on order of declaration
Comment #4 by github-bugzilla — 2015-03-30T06:10:48Z
Comment #5 by dlang-bugzilla — 2015-05-19T00:07:35Z
*** Issue 12102 has been marked as a duplicate of this issue. ***
Comment #6 by github-bugzilla — 2015-06-17T21:01:10Z
Comment #7 by github-bugzilla — 2017-07-19T17:38:54Z
Commits pushed to dmd-cxx at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/ac443bd294103807f047ed9d74a05755f4e08f35 fix Issue 12983 - overload not recognized depending on order of declaration https://github.com/dlang/dmd/commit/dc11b92c6a3dce3f041e665c721cc83f5c0f5086 Merge pull request #4430 from 9rnsr/fix12983 https://github.com/dlang/dmd/commit/b96b82c277c9a6f236cd0cafe27e9fdc4a22b910 Move issue 12983 test case to compilable/testfwdref.d