dmd/compiler/test/fail_compilation/diag10926.d
2023-11-13 00:40:35 +01:00

12 lines
262 B
D

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