Debian Codegraph @

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

raw
1 /*
2 EXTRA_FILES: imports/constraints.d
3 TEST_OUTPUT:
4 ---
5 fail_compilation/constraints_tmpl.d(35): Error: template instance `imports.constraints.dummy!()` does not match template declaration `dummy()()`
6 must satisfy the following constraint:
7 ` false`
8 fail_compilation/constraints_tmpl.d(37): Error: template instance `imports.constraints.message_nice!(int, int)` does not match template declaration `message_nice(T, U)()`
9 with `T = int,
10 U = int`
11 must satisfy the following constraint:
12 ` N!U`
13 fail_compilation/constraints_tmpl.d(38): Error: template instance `imports.constraints.message_ugly!int` does not match template declaration `message_ugly(T)(T v)`
14 with `T = int`
15 must satisfy the following constraint:
16 ` N!T`
17 fail_compilation/constraints_tmpl.d(40): Error: template instance `args!int` does not match template declaration `args(T, U)()`
18 fail_compilation/constraints_tmpl.d(41): Error: template instance `imports.constraints.args!(int, float)` does not match template declaration `args(T, U)()`
19 with `T = int,
20 U = float`
21 must satisfy one of the following constraints:
22 ` N!T
23 N!U`
24 fail_compilation/constraints_tmpl.d(43): Error: template instance `constraints_tmpl.main.lambda!((a) => a)` does not match template declaration `lambda(alias pred)()`
25 with `pred = (a) => a`
26 must satisfy the following constraint:
27 ` N!int`
28 ---
29 */
30
31 void main()
32 {
33 import imports.constraints;
34
35 dummy!();
36
37 message_nice!(int, int);
38 message_ugly!int;
39
40 args!int;
41 args!(int, float);
42
43 lambda!(a => a)();
44 }