[Issue 15156] New: overload set in eponymous template
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Sun Oct 4 13:34:12 PDT 2015
https://issues.dlang.org/show_bug.cgi?id=15156
Issue ID: 15156
Summary: overload set in eponymous template
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: john.loughran.colvin at gmail.com
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.
--
More information about the Digitalmars-d-bugs
mailing list