gcc/testsuite/gdc.test/fail_compilation/fail236.d
raw| 1 | /* |
| 2 | TEST_OUTPUT: |
| 3 | --- |
| 4 | fail_compilation/fail236.d(14): Error: undefined identifier `x` |
| 5 | fail_compilation/fail236.d(22): Error: template `Templ2` is not callable using argument types `!()(int)` |
| 6 | fail_compilation/fail236.d(12): Candidate is: `Templ2(alias a)(x)` |
| 7 | --- |
| 8 | */ |
| 9 | |
| 10 | // https://issues.dlang.org/show_bug.cgi?id=870 |
| 11 | // contradictory error messages for templates |
| 12 | template Templ2(alias a) |
| 13 | { |
| 14 | void Templ2(x) |
| 15 | { |
| 16 | } |
| 17 | } |
| 18 | |
| 19 | void main() |
| 20 | { |
| 21 | int i; |
| 22 | Templ2(i); |
| 23 | } |