www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 12531] New: forward reference with nested struct


           Summary: forward reference with nested struct
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: code dawg.eu

--- Comment #0 from Martin Nowak <code dawg.eu> 2014-04-06 14:42:07 PDT ---
cat > bug.d << CODE
struct Node(T)
    T _val;

void foo()
    static struct Foo
        Node!(Foo)* node;

dmd -c bug.d
a.d(1): Error: struct a.Node!(Foo).Node has forward references

Declaring struct Foo outside of a function resolves the problem.

Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Apr 06 2014