Bug 12531 – forward reference with nested struct

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-04-06T14:42:00Z
Last change time
2015-06-17T21:03:31Z
Keywords
pull, rejects-valid
Assigned to
nobody
Creator
code

Comments

Comment #0 by code — 2014-04-06T14:42:07Z
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.
Comment #1 by k.hara.pg — 2014-08-26T12:52:25Z
Comment #2 by github-bugzilla — 2014-09-03T09:51:46Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/bda8b04aafbf2e846234a2bdb0543d9fa7dfa5c2 fix Issue 12531 - forward reference with nested struct https://github.com/D-Programming-Language/dmd/commit/f497021b98fb684fc038617596f0e80df1017928 Merge pull request #3899 from 9rnsr/fix12531 Issue 12531 - forward reference with nested struct
Comment #3 by github-bugzilla — 2015-03-30T06:10:45Z
Comment #4 by github-bugzilla — 2015-06-17T21:03:31Z