| 1 |
/* |
| 2 |
EXTRA_FILES: imports/constraints.d |
| 3 |
TEST_OUTPUT: |
| 4 |
--- |
| 5 |
fail_compilation/constraints_defs.d(49): Error: template instance `constraints_defs.main.def!(int, 0, (a) => a)` does not match template declaration `def(T, int i = 5, alias R)()` |
| 6 |
with `T = int, |
| 7 |
i = 0, |
| 8 |
R = (a) => a` |
| 9 |
must satisfy the following constraint: |
| 10 |
` N!T` |
| 11 |
fail_compilation/constraints_defs.d(50): Error: template instance `imports.constraints.defa!int` does not match template declaration `defa(T, U = int)()` |
| 12 |
with `T = int` |
| 13 |
must satisfy the following constraint: |
| 14 |
` N!T` |
| 15 |
fail_compilation/constraints_defs.d(51): Error: template instance `imports.constraints.defv!()` does not match template declaration `defv(T = bool, int i = 5, Ts...)()` |
| 16 |
with `Ts = ()` |
| 17 |
must satisfy the following constraint: |
| 18 |
` N!T` |
| 19 |
fail_compilation/constraints_defs.d(52): Error: template instance `imports.constraints.defv!int` does not match template declaration `defv(T = bool, int i = 5, Ts...)()` |
| 20 |
with `T = int, |
| 21 |
Ts = ()` |
| 22 |
must satisfy the following constraint: |
| 23 |
` N!T` |
| 24 |
fail_compilation/constraints_defs.d(53): Error: template instance `imports.constraints.defv!(int, 0)` does not match template declaration `defv(T = bool, int i = 5, Ts...)()` |
| 25 |
with `T = int, |
| 26 |
i = 0, |
| 27 |
Ts = ()` |
| 28 |
must satisfy the following constraint: |
| 29 |
` N!T` |
| 30 |
fail_compilation/constraints_defs.d(54): Error: template instance `imports.constraints.defv!(int, 0, bool)` does not match template declaration `defv(T = bool, int i = 5, Ts...)()` |
| 31 |
with `T = int, |
| 32 |
i = 0, |
| 33 |
Ts = (bool)` |
| 34 |
must satisfy the following constraint: |
| 35 |
` N!T` |
| 36 |
fail_compilation/constraints_defs.d(55): Error: template instance `imports.constraints.defv!(int, 0, bool, float)` does not match template declaration `defv(T = bool, int i = 5, Ts...)()` |
| 37 |
with `T = int, |
| 38 |
i = 0, |
| 39 |
Ts = (bool, float)` |
| 40 |
must satisfy the following constraint: |
| 41 |
` N!T` |
| 42 |
--- |
| 43 |
*/ |
| 44 |
|
| 45 |
void main() |
| 46 |
{ |
| 47 |
import imports.constraints; |
| 48 |
|
| 49 |
def!(int, 0, a => a)(); |
| 50 |
defa!(int)(); |
| 51 |
defv!()(); |
| 52 |
defv!(int)(); |
| 53 |
defv!(int, 0)(); |
| 54 |
defv!(int, 0, bool)(); |
| 55 |
defv!(int, 0, bool, float)(); |
| 56 |
} |