digitalmars.D.bugs - [Issue 10228] New: Type deduction fails with dependencies between parameter types
- d-bugmail puremagic.com (35/35) Jun 01 2013 http://d.puremagic.com/issues/show_bug.cgi?id=10228
http://d.puremagic.com/issues/show_bug.cgi?id=10228 Summary: Type deduction fails with dependencies between parameter types Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nobody puremagic.com ReportedBy: peter.alexander.au gmail.com 04:10:17 PDT --- This fails with the error: "undefined identifier T.Inner" in 2.063 void foo(T)(T x, T.Inner y) {} struct Bar { alias int Inner; }; void main() { foo(Bar(), 0); } Calling foo!Bar works. I don't know if this is really a bug, or an enhancement request, but analogous code works in C++: template <typename T> void foo(T x, typename T::Inner y) {} struct Bar { typedef int Inner; }; int main() { foo(Bar(), 0); return 0; } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jun 01 2013