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: [email protected]
          Reporter: [email protected]

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.

--

Reply via email to