| 1 |
/* |
| 2 |
TEST_OUTPUT: |
| 3 |
--- |
| 4 |
fail_compilation/ice11856_0.d(19): Error: none of the overloads of template `ice11856_0.f` are callable using argument types `!()(int)` |
| 5 |
fail_compilation/ice11856_0.d(13): Candidates are: `f(T)(T t)` |
| 6 |
fail_compilation/ice11856_0.d(16): `f(T)(T t)` |
| 7 |
with `T = int` |
| 8 |
must satisfy the following constraint: |
| 9 |
` !__traits(compiles, .f!T)` |
| 10 |
--- |
| 11 |
*/ |
| 12 |
|
| 13 |
int f(T)(T t) if(!__traits(compiles,.f!T)) { |
| 14 |
return 0; |
| 15 |
} |
| 16 |
int f(T)(T t) if(!__traits(compiles,.f!T)) { |
| 17 |
return 1; |
| 18 |
} |
| 19 |
enum x=f(2); |