July 13, 2023
https://issues.dlang.org/show_bug.cgi?id=24046

Max Samukha <maxsamukha@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |maxsamukha@gmail.com

--- Comment #1 from Max Samukha <maxsamukha@gmail.com> ---
While I agree that function-local static constructors/destructors should just work, you can work around this bug by wrapping the destructor in a struct.

--
July 14, 2023
https://issues.dlang.org/show_bug.cgi?id=24046

RazvanN <razvan.nitu1305@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |razvan.nitu1305@gmail.com

--- Comment #2 from RazvanN <razvan.nitu1305@gmail.com> ---
Maybe an alternative would be for the compiler to automatically call the destructor of all static variables once the program ends.

--