]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/gdc.test/runnable/fix17429.d
Add D front-end, libphobos library, and D2 testsuite.
[thirdparty/gcc.git] / gcc / testsuite / gdc.test / runnable / fix17429.d
1 class Klazz
2 {
3 __gshared size_t count;
4 ~this()
5 {
6 ++count;
7 }
8 }
9
10 void main()
11 {
12 auto s = new Klazz;
13 {
14 scope s2 = s; // calls delete even though it does not own s
15 }
16 assert(Klazz.count == 0);
17 }