https://d.puremagic.com/issues/show_bug.cgi?id=12531
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: [email protected]
ReportedBy: [email protected]
--- Comment #0 from Martin Nowak <[email protected]> 2014-04-06 14:42:07 PDT ---
cat > bug.d << CODE
struct Node(T)
{
T _val;
}
void foo()
{
static struct Foo
{
Node!(Foo)* node;
}
}
CODE
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: -------