April 05, 2021
https://issues.dlang.org/show_bug.cgi?id=21799

          Issue ID: 21799
           Summary: CTFE doesn't call base class destructor for extern(D)
                    classes
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: critical
          Priority: P1
         Component: dmd
          Assignee: nobody@puremagic.com
          Reporter: moonlightsentinel@disroot.org

CTFE only calls the first destructor and skips base class dtors. Test case that fails during CTFE:

int testDeleteDScope()
{
    char[] res;
    {
        scope cd = new ChildD();
        cd.ptr = &res;
    }

    assert(res == "BA", cast(string) res);
    return 0;
}

--