gcc/testsuite/gdc.test/compilable/test17970.d
raw| 1 | shared struct Shared |
| 2 | { |
| 3 | static Shared make() |
| 4 | { |
| 5 | return Shared(); |
| 6 | } |
| 7 | |
| 8 | ~this() |
| 9 | { |
| 10 | } |
| 11 | } |
| 12 | |
| 13 | shared struct Foo |
| 14 | { |
| 15 | ~this() |
| 16 | { |
| 17 | } |
| 18 | } |
| 19 | |
| 20 | struct Inner { ~this() {} } |
| 21 | struct Outer { shared(Inner) inner; } |
| 22 | |
| 23 | void main() |
| 24 | { |
| 25 | Foo x = Foo(); |
| 26 | auto s = Shared.make(); |
| 27 | Outer _; |
| 28 | } |