[Issue 4274] Better array of inner structs error message
https://issues.dlang.org/show_bug.cgi?id=4274 Andrei Alexandrescu and...@erdani.com changed: What|Removed |Added Version|D1 D2 |D2 --
[Issue 4274] Better array of inner structs error message
https://issues.dlang.org/show_bug.cgi?id=4274 --- Comment #7 from github-bugzi...@puremagic.com --- Commit pushed to master at https://github.com/D-Programming-Language/phobos https://github.com/D-Programming-Language/phobos/commit/b754fbe2883bd182e7a2e6e23e7cbad97bedcd64 Update container.d BUG4274 already squashed. --
[Issue 4274] Better array of inner structs error message
http://d.puremagic.com/issues/show_bug.cgi?id=4274 yebblies yebbl...@gmail.com changed: What|Removed |Added Status|NEW |RESOLVED CC||yebbl...@gmail.com Platform|x86 |All Resolution||FIXED OS/Version|Windows |All --- Comment #6 from yebblies yebbl...@gmail.com 2011-07-01 21:52:59 EST --- Arrays of nested structs are now allowed (dmd 1.068 dmd 2.053) -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 4274] Better array of inner structs error message
http://d.puremagic.com/issues/show_bug.cgi?id=4274 nfx...@gmail.com changed: What|Removed |Added CC||nfx...@gmail.com --- Comment #1 from nfx...@gmail.com 2010-06-05 04:33:03 PDT --- I don't understand why arrays of inner structs shouldn't be possible. Is this just another seemingly random restriction with no real foundation of the dmd compiler? -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 4274] Better array of inner structs error message
http://d.puremagic.com/issues/show_bug.cgi?id=4274 --- Comment #2 from bearophile_h...@eml.cc 2010-06-05 04:50:08 PDT --- Structs defined inside functions keep a hidden pointer field to the function they are into. If you return the array of nonstatic structs, the scope stops existing and this pointer points to garbage. To avoid this you need 'struct closures', but I prefer to avoid them. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 4274] Better array of inner structs error message
http://d.puremagic.com/issues/show_bug.cgi?id=4274 --- Comment #3 from nfx...@gmail.com 2010-06-05 05:04:20 PDT --- So what? You _can_ have an array of closures. Why not an array of nested structs? The compiler should obviously allocate all variables referenced by the struct on the heap, just like it is done with closures. Otherwise, it's an half-implemented garbage feature that should be removed before it causes any more harm. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 4274] Better array of inner structs error message
http://d.puremagic.com/issues/show_bug.cgi?id=4274 --- Comment #4 from nfx...@gmail.com 2010-06-05 05:10:24 PDT --- I just tested it, and it seems for nested structs, the compiler correctly allocates upvalues on the heap. The error message you're receiving doesn't make any sense. At least the reason for it must different. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---