Bug 15156 – overload set in eponymous template

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2015-10-04T20:34:00Z
Last change time
2016-01-03T14:01:54Z
Keywords
pull, rejects-valid
Assigned to
nobody
Creator
john.loughran.colvin

Comments

Comment #0 by john.loughran.colvin — 2015-10-04T20:34:12Z
void bish0(T)(string arg, string barg){} void bish1(T)(int argi, string barg){} template bish(T) { alias bish = bish0!T; alias bish = bish1!T; } void main(string[] args) { alias b = bish!string; b("",""); } /d112/f630.d(17): Error: function expected before (), not bish!string of type void There is an easy workaround: template bish(T) { alias tmp = bish0!T; alias tmp = bish1!T; alias bish = tmp; } but it seems to me like it should just work the first way.
Comment #1 by k.hara.pg — 2015-10-05T06:35:03Z
Comment #2 by github-bugzilla — 2015-10-05T10:32:19Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/27503fffd1b63882ac900658b1bb1eb892286e98 fix Issue 15156 - overload set in eponymous template https://github.com/D-Programming-Language/dmd/commit/5e73c30db69347987b617a35ac1c7cbab5ab686a Merge pull request #5162 from 9rnsr/fix15156 Issue 15156 - overload set in eponymous template
Comment #3 by github-bugzilla — 2016-01-03T14:01:54Z