gcc/testsuite/gdc.test/fail_compilation/diag9420.d
raw| 1 | /* |
| 2 | TEST_OUTPUT: |
| 3 | --- |
| 4 | fail_compilation/diag9420.d(21): Error: function `diag9420.S.t3!().tx()` is not callable using argument types `(int)` |
| 5 | fail_compilation/diag9420.d(21): expected 0 argument(s), not 1 |
| 6 | --- |
| 7 | */ |
| 8 | |
| 9 | mixin template Mixin() { } |
| 10 | struct S |
| 11 | { |
| 12 | template t3(T...) |
| 13 | { |
| 14 | void tx(T){} |
| 15 | alias t3 = tx; |
| 16 | } |
| 17 | } |
| 18 | void main() |
| 19 | { |
| 20 | S s1; |
| 21 | s1.t3!()(1); |
| 22 | } |