← Back to index
|
Original Bugzilla link
Bug 9006 – Static struct with nested struct fields sometimes has current context pointers in `init`
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-11-12T05:18:00Z
Last change time
2012-11-13T13:32:50Z
Keywords
pull, wrong-code
Assigned to
nobody
Creator
verylonglogin.reg
Comments
Comment #0
by verylonglogin.reg — 2012-11-12T05:18:07Z
--- void main() { int i; struct NS { int n; //int[3] a; // Uncomment to fail assert on line 20 and pass on line 23 int f() { return i; } } NS ns; assert(ns != NS.init); ns = NS.init; assert(ns == NS.init); static struct SS { NS ns; } assert(SS.init.ns == NS.init); // fails assert(SS.init.ns != NS()); // fails SS s; assert(s.ns != NS.init); // line 20 assert(s != SS.init); // fails s = SS.init; assert(s.ns == NS.init); // line 23, fails assert(s == SS.init); } --- May be related to/duplicate of Bug 9003.
Comment #1
by k.hara.pg — 2012-11-13T04:20:24Z
https://github.com/D-Programming-Language/dmd/pull/1282
Comment #2
by github-bugzilla — 2012-11-13T13:11:34Z
Commits pushed to master at
https://github.com/D-Programming-Language/dmd
https://github.com/D-Programming-Language/dmd/commit/60fc866d3a78345fb2cc7edf0c914d8adf55b7be
fix Issue 9006 - Static struct with nested struct fields sometimes has current context pointers in `init`
https://github.com/D-Programming-Language/dmd/commit/0f91ce38927fc354afe7624bb5f93eb7078d8f49
Merge pull request #1282 from 9rnsr/fix9003 Issue 9003 & 9006 - fill nested struct context pointers