gcc/testsuite/gdc.test/fail_compilation/test18312.d
raw| 1 | /* |
| 2 | REQUIRED_ARGS: -betterC |
| 3 | TEST_OUTPUT: |
| 4 | --- |
| 5 | fail_compilation/test18312.d(14): Error: array concatenation of expression `"[" ~ s ~ "]"` requires the GC which is not available with -betterC |
| 6 | --- |
| 7 | */ |
| 8 | |
| 9 | // https://issues.dlang.org/show_bug.cgi?id=18312 |
| 10 | |
| 11 | extern (C) void main() |
| 12 | { |
| 13 | scope string s; |
| 14 | s = "[" ~ s ~ "]"; |
| 15 | } |