https://issues.dlang.org/show_bug.cgi?id=18594

[email protected] changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]

--- Comment #6 from [email protected] ---
the same error message is given when taking the address of a non-lvalue, but
"cannot be modified" doesn't necessarily apply there (and can be confusing)

// Error: `a[0..2]` is not an lvalue and cannot be modified
ubyte[2] a;
const void* p1 = &a[0..2];

// Error: cannot modify constant `1`
const void* p2 = &1;

for these, the message should rather say something like "cannot have its
address taken"

--

Reply via email to