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