Debian Codegraph @

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

raw
1 /*
2 TEST_OUTPUT:
3 ---
4 fail_compilation/diag10926.d(11): Error: cannot modify expression `cast(const(int)[])c` because it is not an lvalue
5 ---
6 */
7
8 void main() {
9 const(int)[] a, b;
10 int[] c, d;
11 (true ? a : c) ~= 20; // line 6, Error: a is not an lvalue
12 }