http://d.puremagic.com/issues/show_bug.cgi?id=8950
Summary: postblit not called on const static array initialization Product: D Version: D2 Platform: All OS/Version: All Status: NEW Keywords: wrong-code Severity: major Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: verylonglogin....@gmail.com --- Comment #0 from Denis Shelomovskij <verylonglogin....@gmail.com> 2012-11-03 10:12:57 MSK --- --- struct S { static int postblits = 0; this(this) const { ++postblits; } } void main() { auto s = S(); S[2] arr = s; assert(S.postblits == 2); // ok S.postblits = 0; const S[2] constArr = s; assert(S.postblits == 2); // failed: S.postblits == 0 S.postblits = 0; const S[2] constArr2 = arr; assert(S.postblits == 2); // failed: S.postblits == 0 S.postblits = 0; } --- -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------