gcc/testsuite/gdc.test/fail_compilation/diag9004.d
raw| 1 | /* |
| 2 | TEST_OUTPUT: |
| 3 | --- |
| 4 | fail_compilation/diag9004.d(21): Error: template `bar` is not callable using argument types `!()(Foo!int, int)` |
| 5 | fail_compilation/diag9004.d(14): Candidate is: `bar(FooT)(FooT foo, FooT.T x)` |
| 6 | --- |
| 7 | */ |
| 8 | |
| 9 | struct Foo(_T) |
| 10 | { |
| 11 | alias _T T; |
| 12 | } |
| 13 | |
| 14 | void bar(FooT)(FooT foo, FooT.T x) |
| 15 | { |
| 16 | } |
| 17 | |
| 18 | void main() |
| 19 | { |
| 20 | Foo!int foo; |
| 21 | bar(foo, 1); |
| 22 | } |