digitalmars.D.bugs - [Issue 18872] New: -dip1000 does not allow static arrays for types
- d-bugmail puremagic.com (27/27) May 18 2018 https://issues.dlang.org/show_bug.cgi?id=18872
https://issues.dlang.org/show_bug.cgi?id=18872 Issue ID: 18872 Summary: -dip1000 does not allow static arrays for types with destructors Product: D Version: D2 Hardware: x86 OS: Windows Status: NEW Severity: normal Priority: P1 Component: druntime Assignee: nobody puremagic.com Reporter: Ajieskola gmail.com safe: static struct AType { ~this(){} } void main() { AType[5] array; } complains: reference to local variable 'array' assigned to non-scope parameter 'a' calling object._ArrayDtor!(CopyPreventer)._ArrayDtor As I understand it, running a destroyer when finalizing a static array should work just as well as finalizing a single local with an elaborate destructor. --
May 18 2018