On Thursday, 24 January 2019 at 21:57:57 UTC, Rubn wrote:
it could be an error if the function didn't assign the variable a value instead
I don't like that, conditional mutations like this should work too:
void conditionalIncrement(bool condition, out long value) {
if (condition)
++value;
}
conditionalIncrement(true, 10); // not allowed, rvalue
long value = 10;
conditionalIncrement(true, out value); // fine
