[Issue 21799] New: CTFE doesn't call base class destructor for extern(D) classes
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Apr 5 14:16:11 UTC 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 at puremagic.com
Reporter: moonlightsentinel at 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;
}
--
More information about the Digitalmars-d-bugs
mailing list