gcc/testsuite/gdc.test/fail_compilation/fail21206.d
raw| 1 | // https://issues.dlang.org/show_bug.cgi?id=21206 |
| 2 | /* TEST_OUTPUT: |
| 3 | --- |
| 4 | fail_compilation/fail21206.d(10): Error: function `toString` cannot return type `string` because its linkage is `extern(C++)` |
| 5 | fail_compilation/fail21206.d(10): slices are specific to D and do not have a counterpart representation in C++ |
| 6 | --- |
| 7 | */ |
| 8 | extern(C++) struct Obj |
| 9 | { |
| 10 | string toString() |
| 11 | { |
| 12 | return "ret"; |
| 13 | } |
| 14 | } |