gcc/testsuite/gdc.test/fail_compilation/test21477.d
raw| 1 | /* REQUIRED_ARGS: -betterC |
| 2 | TEST_OUTPUT: |
| 3 | --- |
| 4 | fail_compilation/test21477.d(103): Error: expression `[1]` uses the GC and cannot be used with switch `-betterC` |
| 5 | --- |
| 6 | */ |
| 7 | |
| 8 | // https://issues.dlang.org/show_bug.cgi?id=21477 |
| 9 | |
| 10 | #line 100 |
| 11 | |
| 12 | int test() |
| 13 | { |
| 14 | int[] foo = [1]; |
| 15 | return 0; |
| 16 | } |