]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/gdc.test/fail_compilation/fail22084.d
d: Import dmd b8384668f, druntime e6caaab9, phobos 5ab9ad256 (v2.098.0-beta.1)
[thirdparty/gcc.git] / gcc / testsuite / gdc.test / fail_compilation / fail22084.d
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 }