gcc/testsuite/gdc.test/fail_compilation/diag9880.d
raw| 1 | /* |
| 2 | TEST_OUTPUT: |
| 3 | --- |
| 4 | fail_compilation/diag9880.d(12): Error: template instance `diag9880.foo!string` does not match template declaration `foo(T)(int)` |
| 5 | with `T = string` |
| 6 | must satisfy the following constraint: |
| 7 | ` is(T == int)` |
| 8 | --- |
| 9 | */ |
| 10 | |
| 11 | void foo(T)(int) if (is(T == int)) {} |
| 12 | void main() { alias f = foo!string; } |