[Issue 17186] New: Type inference for parameters with default argument
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Wed Feb 15 11:22:08 PST 2017
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: nobody at puremagic.com
Reporter: doob at me.com
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.
--
More information about the Digitalmars-d-bugs
mailing list