xref: /netbsd-src/external/gpl3/gcc/dist/libphobos/testsuite/libphobos.typeinfo/enum_.d (revision b1e838363e3c6fc78a55519254d99869742dd33c)
1 // https://issues.dlang.org/show_bug.cgi?id=21441
2 
3 int dtorCount;
4 int postblitCount;
5 
6 struct S
7 {
thisS8     this(this) { ++postblitCount; }
~thisS9     ~this() { ++dtorCount; }
10 }
11 
12 enum E : S { _ = S.init }
13 
main()14 void main()
15 {
16     E e;
17     typeid(e).destroy(&e);
18     assert(dtorCount == 1);
19     typeid(e).postblit(&e);
20     assert(postblitCount == 1);
21 }
22