Ali Çehreli:
> The error messages are strange anyway.Agreed. In the case of assignment to rvalue, dmd is better: a + b = 42; // Error: a + b is not an lvalue
The error messages in the OP case can and should be improved. I suggest to take a look in Bugzilla to see if there's already an ER for it, and otherwise to add the little diagnostic ER it to Bugzilla.
Bye, bearophile