gcc/testsuite/gdc.test/fail_compilation/fail20771.d
raw| 1 | /* |
| 2 | TEST_OUTPUT: |
| 3 | --- |
| 4 | fail_compilation/fail20771.d(19): Error: cannot pass types with postblits or copy constructors as variadic arguments |
| 5 | fail_compilation/fail20771.d(20): Error: cannot pass types with postblits or copy constructors as variadic arguments |
| 6 | --- |
| 7 | */ |
| 8 | extern void variadic(...); |
| 9 | |
| 10 | struct S20771 |
| 11 | { |
| 12 | int field; |
| 13 | this(this) { } |
| 14 | } |
| 15 | |
| 16 | void test() |
| 17 | { |
| 18 | auto v = S20771(0); |
| 19 | variadic(v, |
| 20 | S20771(1)); |
| 21 | } |