Summary: Inner type deduction?
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: DMD

--- Comment #0 from 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

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 does not match any function template
temp.d(10): Error: template cannot deduce template function from
argument types !()(Node,Node)

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to