[Issue 18769] New: Cannot infer template parameters for aliased types
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Apr 17 09:17:02 UTC 2018
https://issues.dlang.org/show_bug.cgi?id=18769
Issue ID: 18769
Summary: Cannot infer template parameters for aliased types
Product: D
Version: D2
Hardware: All
URL: http://dlang.org/
OS: All
Status: NEW
Severity: major
Priority: P3
Component: dmd
Assignee: nobody at puremagic.com
Reporter: eyal at weka.io
Example code:
struct S(A) {}
alias T(A) = S!A;
// OK:
void withS(A)(S!A x) {}
withS(S!int());
// "foo cannot deduce function from argument types":
void withT(A)(T!A x) {}
withT(S!int());
Aliases in parameter types should be expanded (symbolically) before inferring.
--
More information about the Digitalmars-d-bugs
mailing list