d: Merge upstream dmd ff57fec515, druntime ff57fec515, phobos 17bafda79.
[official-gcc.git] / gcc / testsuite / gdc.test / fail_compilation / test24159.d
blob35c7f364168b418342a34fc92861e1954d3b6bdf
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 */
10 extern(C) void main()
12 int[] x = null;
13 x ~= 3;