digitalmars.D.bugs - [Issue 6470] New: postblits not called on arrays of structs
- d-bugmail puremagic.com (61/61) Aug 11 2011 http://d.puremagic.com/issues/show_bug.cgi?id=6470
- d-bugmail puremagic.com (10/10) Sep 09 2011 http://d.puremagic.com/issues/show_bug.cgi?id=6470
- d-bugmail puremagic.com (10/10) May 07 2012 http://d.puremagic.com/issues/show_bug.cgi?id=6470
- d-bugmail puremagic.com (10/10) May 07 2012 http://d.puremagic.com/issues/show_bug.cgi?id=6470
- d-bugmail puremagic.com (10/10) Jun 13 2013 http://d.puremagic.com/issues/show_bug.cgi?id=6470
http://d.puremagic.com/issues/show_bug.cgi?id=6470 Summary: postblits not called on arrays of structs Product: D Version: D1 & D2 Platform: All OS/Version: All Status: NEW Keywords: wrong-code Severity: major Priority: P2 Component: DMD AssignedTo: nobody puremagic.com ReportedBy: mrmocool gmx.de --- Comment #0 from Trass3r <mrmocool gmx.de> 2011-08-11 17:05:46 PDT --- import std.stdio; struct F { long m; this(long arg) { m = arg; writeln("\tconstructed F ", arg); } ~this() { writeln("\tdestructed F ", m); } this(this) { writeln("\tcopied F ", m); } } void main() { F a = F(1); F b = F(2); write("F[] arr = [a, b];\n"); F[] arr = [a, b]; write("F[] arr3;\narr3 ~= a;\n"); F[] arr3; arr3 ~= a; write("F[2] arr2 = [a, b];\n"); F[2] arr2 = [a, b]; } Output: constructed F 1 constructed F 2 F[] arr = [a, b]; // no postblit called (no destructor either, see bug 2834) F[] arr3; arr3 ~= a; copied F 1 // only here it is called F[2] arr2 = [a, b]; // no postblit called destructed F 2 // b from arr2 destructed F 1 // a from arr2 destructed F 2 // b destructed F 1 // a Note that this issue ahs to be taken into consideration as well: http://www.digitalmars.com/d/archives/digitalmars/D/Static_array_initialization_113536.html -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Aug 11 2011
http://d.puremagic.com/issues/show_bug.cgi?id=6470 Kenji Hara <k.hara.pg gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |patch --- Comment #1 from Kenji Hara <k.hara.pg gmail.com> 2011-09-09 09:35:14 PDT --- https://github.com/D-Programming-Language/dmd/pull/375 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Sep 09 2011
http://d.puremagic.com/issues/show_bug.cgi?id=6470 --- Comment #2 from github-bugzilla puremagic.com 2012-05-07 19:43:20 PDT --- Commit pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/26aacf0b510d59f572122a55a9a74c071aab889c Issue 6470 - postblits not called on arrays of structs - Call postblits on array slice assign - Call postblits on array literal elements -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
May 07 2012
http://d.puremagic.com/issues/show_bug.cgi?id=6470 Walter Bright <bugzilla digitalmars.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |bugzilla digitalmars.com Resolution| |FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
May 07 2012
http://d.puremagic.com/issues/show_bug.cgi?id=6470 Steven Schveighoffer <schveiguy yahoo.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |schveiguy yahoo.com --- Comment #3 from Steven Schveighoffer <schveiguy yahoo.com> 2013-06-13 07:29:05 PDT --- *** Issue 6182 has been marked as a duplicate of this issue. *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jun 13 2013