| 1 |
/* |
| 2 |
EXTRA_FILES: imports/constraints.d |
| 3 |
TEST_OUTPUT: |
| 4 |
--- |
| 5 |
fail_compilation/constraints_func1.d(79): Error: template `test1` is not callable using argument types `!()(int)` |
| 6 |
fail_compilation/imports/constraints.d(9): Candidate is: `test1(T)(T v)` |
| 7 |
with `T = int` |
| 8 |
must satisfy the following constraint: |
| 9 |
` N!T` |
| 10 |
fail_compilation/constraints_func1.d(80): Error: template `test2` is not callable using argument types `!()(int)` |
| 11 |
fail_compilation/imports/constraints.d(10): Candidate is: `test2(T)(T v)` |
| 12 |
with `T = int` |
| 13 |
must satisfy the following constraint: |
| 14 |
` !P!T` |
| 15 |
fail_compilation/constraints_func1.d(81): Error: template `test3` is not callable using argument types `!()(int)` |
| 16 |
fail_compilation/imports/constraints.d(11): Candidate is: `test3(T)(T v)` |
| 17 |
with `T = int` |
| 18 |
must satisfy the following constraint: |
| 19 |
` N!T` |
| 20 |
fail_compilation/constraints_func1.d(82): Error: template `test4` is not callable using argument types `!()(int)` |
| 21 |
fail_compilation/imports/constraints.d(12): Candidate is: `test4(T)(T v)` |
| 22 |
with `T = int` |
| 23 |
must satisfy the following constraint: |
| 24 |
` N!T` |
| 25 |
fail_compilation/constraints_func1.d(83): Error: template `test5` is not callable using argument types `!()(int)` |
| 26 |
fail_compilation/imports/constraints.d(13): Candidate is: `test5(T)(T v)` |
| 27 |
with `T = int` |
| 28 |
must satisfy one of the following constraints: |
| 29 |
` N!T |
| 30 |
N!T` |
| 31 |
fail_compilation/constraints_func1.d(84): Error: template `test6` is not callable using argument types `!()(int)` |
| 32 |
fail_compilation/imports/constraints.d(14): Candidate is: `test6(T)(T v)` |
| 33 |
with `T = int` |
| 34 |
must satisfy one of the following constraints: |
| 35 |
` N!T |
| 36 |
N!T |
| 37 |
!P!T` |
| 38 |
fail_compilation/constraints_func1.d(85): Error: template `test7` is not callable using argument types `!()(int)` |
| 39 |
fail_compilation/imports/constraints.d(15): Candidate is: `test7(T)(T v)` |
| 40 |
with `T = int` |
| 41 |
must satisfy one of the following constraints: |
| 42 |
` N!T |
| 43 |
N!T` |
| 44 |
fail_compilation/constraints_func1.d(86): Error: template `test8` is not callable using argument types `!()(int)` |
| 45 |
fail_compilation/imports/constraints.d(16): Candidate is: `test8(T)(T v)` |
| 46 |
with `T = int` |
| 47 |
must satisfy the following constraint: |
| 48 |
` N!T` |
| 49 |
fail_compilation/constraints_func1.d(87): Error: template `test9` is not callable using argument types `!()(int)` |
| 50 |
fail_compilation/imports/constraints.d(17): Candidate is: `test9(T)(T v)` |
| 51 |
with `T = int` |
| 52 |
must satisfy the following constraint: |
| 53 |
` !P!T` |
| 54 |
fail_compilation/constraints_func1.d(88): Error: template `test10` is not callable using argument types `!()(int)` |
| 55 |
fail_compilation/imports/constraints.d(18): Candidate is: `test10(T)(T v)` |
| 56 |
with `T = int` |
| 57 |
must satisfy the following constraint: |
| 58 |
` !P!T` |
| 59 |
fail_compilation/constraints_func1.d(89): Error: template `test11` is not callable using argument types `!()(int)` |
| 60 |
fail_compilation/imports/constraints.d(19): Candidate is: `test11(T)(T v)` |
| 61 |
with `T = int` |
| 62 |
must satisfy one of the following constraints: |
| 63 |
` N!T |
| 64 |
!P!T` |
| 65 |
fail_compilation/constraints_func1.d(90): Error: template `test12` is not callable using argument types `!()(int)` |
| 66 |
fail_compilation/imports/constraints.d(20): Candidate is: `test12(T)(T v)` |
| 67 |
with `T = int` |
| 68 |
must satisfy the following constraint: |
| 69 |
` !P!T` |
| 70 |
fail_compilation/constraints_func1.d(92): Error: template `test1` is not callable using argument types `!()(int, int)` |
| 71 |
fail_compilation/imports/constraints.d(9): Candidate is: `test1(T)(T v)` |
| 72 |
--- |
| 73 |
*/ |
| 74 |
|
| 75 |
void main() |
| 76 |
{ |
| 77 |
import imports.constraints; |
| 78 |
|
| 79 |
test1(0); |
| 80 |
test2(0); |
| 81 |
test3(0); |
| 82 |
test4(0); |
| 83 |
test5(0); |
| 84 |
test6(0); |
| 85 |
test7(0); |
| 86 |
test8(0); |
| 87 |
test9(0); |
| 88 |
test10(0); |
| 89 |
test11(0); |
| 90 |
test12(0); |
| 91 |
|
| 92 |
test1(0, 0); |
| 93 |
} |