gcc/testsuite/gdc.test/runnable/test19122.d
raw| 1 | // https://issues.dlang.org/show_bug.cgi?id=19122 |
| 2 | struct HasDestructor |
| 3 | { |
| 4 | ~this() |
| 5 | { |
| 6 | assert(0); |
| 7 | } |
| 8 | this(this) |
| 9 | { |
| 10 | assert(0); |
| 11 | } |
| 12 | } |
| 13 | |
| 14 | struct S |
| 15 | { |
| 16 | union |
| 17 | { |
| 18 | int i; |
| 19 | HasDestructor h; |
| 20 | } |
| 21 | } |
| 22 | |
| 23 | struct S2 |
| 24 | { |
| 25 | union |
| 26 | { |
| 27 | align(1) |
| 28 | { |
| 29 | int i; |
| 30 | HasDestructor h; |
| 31 | } |
| 32 | } |
| 33 | } |
| 34 | |
| 35 | void main() |
| 36 | { |
| 37 | { |
| 38 | S s; |
| 39 | s = s; |
| 40 | } |
| 41 | |
| 42 | { |
| 43 | S2 s2; |
| 44 | s2 = s2; |
| 45 | } |
| 46 | } |