← Back to index
|
Original Bugzilla link
Bug 14023 – [CTFE] postblits/destructors not called on static array index assignment
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2015-01-21T14:59:00Z
Last change time
2015-01-25T00:11:42Z
Keywords
CTFE, pull
Assigned to
nobody
Creator
k.hara.pg
Comments
Comment #0
by k.hara.pg — 2015-01-21T14:59:17Z
int test() { int cpctor, dtor; struct S { this(this) { cpctor++; } ~this() { dtor++; } } S[3] sa; S[3][] arr = [[S(), S(), S()]]; assert(cpctor == 0 && dtor == 0); arr[0] = sa; assert(cpctor == 3 && dtor == 3); return 1; } //static assert(test()); // ctfe -> fails void main() { test(); // runtime -> ok }
Comment #1
by k.hara.pg — 2015-01-24T07:49:06Z
https://github.com/D-Programming-Language/dmd/pull/4329
Comment #2
by github-bugzilla — 2015-01-25T00:11:41Z
Commits pushed to master at
https://github.com/D-Programming-Language/dmd
https://github.com/D-Programming-Language/dmd/commit/cb7b27ae21ccf79c5981fdf10c80e2ab4720c3d7
fix Issue 14023 - [CTFE] postblits/destructors not called on static array index assignment
https://github.com/D-Programming-Language/dmd/commit/f96ab68fb1530b9a9684d7a62fb59ba3ee90aa00
Merge pull request #4329 from 9rnsr/fix_ctfe Issue 14022 & 14023 - [CTFE] postblits/destructors not called on static array assignment