[Issue 14595] [REG2.066] RefCounted data corrupted when in an AA

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Sat May 16 20:08:37 PDT 2015


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

--- Comment #1 from Vladimir Panteleev <thecybershadow at gmail.com> ---
I have reduced the above to the following code:

//////////// test.d ////////////
struct S
{
    this(int) { }

    bool okToDestroy;

    ~this()
    {
        assert(okToDestroy);
    }
}

S[string] aa;

void main()
{
    aa[null] = S(42);
    aa[null].okToDestroy = true;
}
////////////////////////////////

But this reduction does not manifest as a regression.

--


More information about the Digitalmars-d-bugs mailing list