[Issue 7349] assert(0) in class destructor - bad (or incorrect) error

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Tue May 20 01:50:01 PDT 2014


https://issues.dlang.org/show_bug.cgi?id=7349

--- Comment #1 from joakim at airpost.net ---
Is this a bug or is it not allowed to assert in a destructor?  I ran into this
while running the druntime tests on Android/x86, was very annoying as the
assert in core.sync.semaphore was swallowed up by the
InvalidMemoryOperationError so I didn't know where it was actually coming from
till I stuck printfs everywhere.  If the assert shouldn't be allowed, druntime
and possibly other D code needs to be cleaned up to get rid of any asserts in
destructors.

--


More information about the Digitalmars-d-bugs mailing list