On 11/3/12, Andrej Mitrovic <andrej.mitrov...@gmail.com> wrote: > It should be something like "cannot modify const member x".
In fact the error is already read but the else statement is not taken in Expression::checkModifiable: if (var && var->storage_class & STCctorinit) // goes here { const char *p = var->isStatic() ? "static " : ""; error("can only initialize %sconst member %s inside %sconstructor", p, var->toChars(), p); } else { OutBuffer buf; MODtoBuffer(&buf, type->mod); error("cannot modify %s expression %s", buf.toChars(), toChars()); }