[Issue 14650] New: Destructors are not called on global variables
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Thu Jun 4 05:08:05 PDT 2015
https://issues.dlang.org/show_bug.cgi?id=14650
Issue ID: 14650
Summary: Destructors are not called on global variables
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Keywords: wrong-code
Severity: normal
Priority: P1
Component: DMD
Assignee: nobody at puremagic.com
Reporter: verylonglogin.reg at gmail.com
This program works fine but shouldn't:
---
struct S
{ ~this() { assert(0); } }
S s;
void main() { }
---
Destructors on global variables should be either prohibited or correctly
called.
Note:
This issue was introduced by fixing Issue 6364. See Issue 6364, comment 2.
--
More information about the Digitalmars-d-bugs
mailing list