[Issue 18872] New: -dip1000 does not allow static arrays for types with destructors
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri May 18 19:27:00 UTC 2018
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 at puremagic.com
Reporter: Ajieskola at 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.
--
More information about the Digitalmars-d-bugs
mailing list