Debian Codegraph @

gcc/testsuite/gdc.test/fail_compilation/fail22084.d

raw
1 // https://issues.dlang.org/show_bug.cgi?id=22084
2 /*
3 TEST_OUTPUT:
4 ---
5 fail_compilation/fail22084.d(22): Error: cannot pass types that need destruction as variadic arguments
6 ---
7 */
8 import core.stdc.stdarg;
9
10 extern(C++) void testVariadic(int a, ...)
11 {
12 }
13
14 struct Destructor
15 {
16 ~this() { }
17 }
18
19 void test()
20 {
21 auto a0 = Destructor();
22 testVariadic(1, a0);
23 }