digitalmars.D.bugs - [Issue 8700] New: Inner type deduction?
- d-bugmail puremagic.com (36/36) Sep 20 2012 http://d.puremagic.com/issues/show_bug.cgi?id=8700
- d-bugmail puremagic.com (11/11) Dec 20 2012 http://d.puremagic.com/issues/show_bug.cgi?id=8700
http://d.puremagic.com/issues/show_bug.cgi?id=8700 Summary: Inner type deduction? Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: enhancement Priority: P2 Component: DMD AssignedTo: nobody puremagic.com ReportedBy: bearophile_hugs eml.cc --- Comment #0 from bearophile_hugs eml.cc 2012-09-20 10:14:39 PDT --- Maybe according to D specs this is not supposed to work, but is this good to support? It's useful as inner types are becoming more and more common in D code: struct Tree1 { static struct Node { int x; } } struct Tree2 { static struct Node { int x, y; } } void foo(T)(T.Node n1, T.Node n2) {} // *** void main() { Tree1.Node n1, n2; foo(n1, n2); } DMD 2.061alpha gives: temp.d(10): Error: undefined identifier T.Node temp.d(10): Error: template temp.foo does not match any function template declaration temp.d(10): Error: template temp.foo(T) cannot deduce template function from argument types !()(Node,Node) -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Sep 20 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8700 Kenji Hara <k.hara.pg gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |DUPLICATE --- Comment #1 from Kenji Hara <k.hara.pg gmail.com> 2012-12-20 16:41:05 PST --- *** This issue has been marked as a duplicate of issue 9022 *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Dec 20 2012