digitalmars.D.bugs - [Issue 14720] New: Template function reported non-template
- via Digitalmars-d-bugs (34/34) Jun 22 2015 https://issues.dlang.org/show_bug.cgi?id=14720
https://issues.dlang.org/show_bug.cgi?id=14720 Issue ID: 14720 Summary: Template function reported non-template Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW Severity: normal Priority: P1 Component: dmd Assignee: nobody puremagic.com Reporter: yshuiv7 gmail.com I'm not sure if this is a bug or just really confusing error messages: This piece of code: import std.traits; template ReturnTypeEx(alias A, B) { alias ReturnTypeEx = ReturnType!(A!B); } template a(R) { void a(S)(auto ref S i) { } } template b(alias R) { void b(S)(S i) { alias Ra = ReturnTypeEx!(R, S); } } void main() { alias bb = b!(a!ulong); alias bbb = ReturnTypeEx!(bb, int); } Generate error saying the nested template function a.a is not a template function. --
Jun 22 2015