Debian Codegraph @

gcc/testsuite/gdc.test/fail_compilation/test24159.d

raw
1 // https://issues.dlang.org/show_bug.cgi?id=24159
2 // REQUIRED_ARGS: -betterC
3 /*
4 TEST_OUTPUT:
5 ---
6 fail_compilation/test24159.d(13): Error: appending to array in `x ~= 3` requires the GC which is not available with -betterC
7 ---
8 */
9
10 extern(C) void main()
11 {
12 int[] x = null;
13 x ~= 3;
14 }