https://issues.dlang.org/show_bug.cgi?id=17186
Issue ID: 17186
Summary: Type inference for parameters with default argument
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P1
Component: dmd
Assignee: [email protected]
Reporter: [email protected]
D supports type inference in my places, like variable declarations:
auto a = 3;
But the same thing doesn't work with parameters, neither template or regular
parameters:
void foo(auto a = 3);
void foo(auto a = 3)();
Implementing this feature would allow for some function signatures to be
shorter and make the language more consistent. Currently it seems like an
arbitrary limitation.
--