Debian Codegraph @

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

raw
1 /*
2 TEST_OUTPUT:
3 ---
4 fail_compilation/ice10419.d(12): Error: cannot modify expression `arr().length` because it is not an lvalue
5 ---
6 */
7
8 int[] arr() { return []; }
9
10 void main()
11 {
12 arr().length = 1;
13 }