]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/gdc.test/fail_compilation/vararg2.d
d: Import dmd b8384668f, druntime e6caaab9, phobos 5ab9ad256 (v2.098.0-beta.1)
[thirdparty/gcc.git] / gcc / testsuite / gdc.test / fail_compilation / vararg2.d
1 /* TEST_OUTPUT:
2 ---
3 fail_compilation/vararg2.d(106): Error: function `vararg2.foo(int x, const return ...)` is not callable using argument types `(double)`
4 fail_compilation/vararg2.d(106): cannot pass argument `1.0` of type `double` to parameter `int x`
5 fail_compilation/vararg2.d(111): Error: function `vararg2.bar(int x, scope shared ...)` is not callable using argument types `(double)`
6 fail_compilation/vararg2.d(111): cannot pass argument `1.0` of type `double` to parameter `int x`
7 ---
8 */
9
10 #line 100
11
12 int* foo(int x, return const ...);
13 int* bar(int x, scope shared ...);
14
15 void test1()
16 {
17 foo(1.0);
18 }
19
20 void test2()
21 {
22 bar(1.0);
23 }