← Back to index
|
Original Bugzilla link
Bug 6636 – Destructors of static array elements are not called on function parameter
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2011-09-09T09:10:00Z
Last change time
2012-05-07T21:13:07Z
Keywords
patch, wrong-code
Assigned to
nobody
Creator
k.hara.pg
See also
http://d.puremagic.com/issues/show_bug.cgi?id=6637
Comments
Comment #0
by k.hara.pg — 2011-09-09T09:10:48Z
static int sdtor; struct S { ~this() { ++sdtor; } } void func(S[3] sa) { // sa should be destructed at the end of func() } void main() { sdtor = 0; S[3] sa; func(sa); assert(sdtor == 3); }
Comment #1
by k.hara.pg — 2011-09-09T09:35:57Z
https://github.com/D-Programming-Language/dmd/pull/375
Comment #2
by lovelydear — 2012-04-27T14:40:55Z
This one fails unless compiled with -release option.
Comment #3
by github-bugzilla — 2012-05-07T19:43:26Z
Commit pushed to master at
https://github.com/D-Programming-Language/dmd
https://github.com/D-Programming-Language/dmd/commit/57d7f41f82bac4efd05053b5ae23642b65ad18aa
Issue 6636 - Destructors of static array elements are not called on function parameter Call dtor of static array parameter at function scope end.