Debian Codegraph @

gcc/testsuite/gdc.test/runnable/test24139.d

raw
1 // https://issues.dlang.org/show_bug.cgi?id=24139
2
3 struct S1
4 {
5 int x;
6 extern(C++) ~this() { assert(&this == s1); }
7 }
8
9 extern(C++) struct S2
10 {
11 int x;
12 ~this() { assert(&this == s2); }
13 }
14
15 S1* s1;
16 S2* s2;
17
18 void main()
19 {
20 s1 = new S1;
21 s2 = new S2;
22
23 typeid(S1).destroy(s1);
24 typeid(S2).destroy(s2);
25 }