http://d.puremagic.com/issues/show_bug.cgi?id=9245
Summary: [CTFE] postblit not called on static array
initialization
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Keywords: CTFE, wrong-code
Severity: major
Priority: P2
Component: DMD
AssignedTo: [email protected]
ReportedBy: [email protected]
--- Comment #0 from Denis Shelomovskij <[email protected]> 2012-12-30
12:16:52 MSK ---
---
void f()
{
int postblits = 0;
struct S
{
this(this) const
{ ++postblits; }
}
auto s = S();
S[2] arr = s;
assert(postblits == 2); // failed: S.postblits == 0
postblits = 0;
const S[2] constArr = s;
assert(postblits == 2); // failed: S.postblits == 0
postblits = 0;
const S[2] constArr2 = arr;
assert(postblits == 2); // failed: S.postblits == 0
postblits = 0;
}
---
Also see same non-CTFE issue 8950.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------