gcc/testsuite/gdc.test/fail_compilation/fail19948.d
raw| 1 | // https://issues.dlang.org/show_bug.cgi?id=19948 |
| 2 | |
| 3 | /* |
| 4 | TEST_OUTPUT: |
| 5 | --- |
| 6 | fail_compilation/fail19948.d(16): Error: function `func` is not callable using argument types `(X)` |
| 7 | fail_compilation/fail19948.d(16): cannot pass argument `X()` of type `fail19948.main.X` to parameter `const(fail19948.X)` |
| 8 | fail_compilation/fail19948.d(19): `fail19948.func(const(X))` declared here |
| 9 | --- |
| 10 | */ |
| 11 | |
| 12 | struct X {} |
| 13 | void main() |
| 14 | { |
| 15 | struct X {} |
| 16 | func(X()); |
| 17 | } |
| 18 | |
| 19 | void func(const(X)) {} |