https://issues.dlang.org/show_bug.cgi?id=19888
Issue ID: 19888
Summary: default parameters in templates with tuple
parameters+defaults are thrown away
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P1
Component: dmd
Assignee: [email protected]
Reporter: [email protected]
This example fails to compile on all known DMD versions.
```
unittest {
assert(func(1,0) == 1);
assert(func(1) == 1); //compile error
assert(func2() == 0);
}
template AliasSeq(TList...)
{
alias AliasSeq = TList;
}
T func(T)(T value, AliasSeq!(int) params = AliasSeq!(0))
{
return value;
}
int func2(AliasSeq!(int) params = AliasSeq!(0))
{
return 0;
}
```
--