tests/dmd/runnable/imports/test18868_fls.d
raw| 1 | module imports.test18868_fls; |
| 2 | |
| 3 | template FLS(T) |
| 4 | { |
| 5 | int ctorcount = 0; |
| 6 | int dtorcount = 0; |
| 7 | int sharedctorcount = 0; |
| 8 | int shareddtorcount = 0; |
| 9 | |
| 10 | static this() |
| 11 | { |
| 12 | assert(ctorcount == 0); |
| 13 | ctorcount += 1; |
| 14 | } |
| 15 | |
| 16 | static ~this() |
| 17 | { |
| 18 | assert(dtorcount == 0); |
| 19 | dtorcount += 1; |
| 20 | } |
| 21 | |
| 22 | shared static this() |
| 23 | { |
| 24 | assert(sharedctorcount == 0); |
| 25 | sharedctorcount += 1; |
| 26 | } |
| 27 | |
| 28 | shared static ~this() |
| 29 | { |
| 30 | assert(shareddtorcount == 0); |
| 31 | shareddtorcount += 1; |
| 32 | } |
| 33 | } |