Use-after-scope bug in Phobos unittest, how to fix?
Dennis
dkorpel at gmail.com
Mon May 15 20:22:15 UTC 2023
On Monday, 15 May 2023 at 18:55:09 UTC, Johan wrote:
> I see that the test is trying to prove that the MyRefCounted
> dtors are run correctly when the scope ends.
That the destructor is run at the end of the scope is the job of
the compiler, not something that this unittest needs to test. To
test that the destructor nullifies the `store`, `__dtor` can be
called manually.
More information about the Digitalmars-d
mailing list