MATCH: Improve `A CMP 0 ? A : -A` set of patterns to use bitwise_equal_p.
[official-gcc.git] / gcc / testsuite / gdc.test / fail_compilation / call_function_type.d
blobda60092c8491f4e0d858ca7e7413a3e3c0cfa1dc
1 /*
2 TEST_OUTPUT:
3 ---
4 fail_compilation/call_function_type.d(18): Error: missing argument for parameter #1: `int`
5 fail_compilation/call_function_type.d(19): Error: cannot call `int(int)(3)` at compile time
6 ---
7 */
9 // This is a rare case where `dmd.expressionsem.functionParameters` catches a missing argument error,
10 // which is usually caught earlier by `TypeFunction.callMatch`, and had no test coverage yet.
11 // This was found while implementing named arguments and reduced from `vibe.internal.meta.traits`.
13 int f(int);
15 void m()
17 alias FT = typeof(f);
18 enum X0 = FT();
19 enum X1 = FT(3);