On Friday, 21 October 2016 at 12:34:58 UTC, Andrei Alexandrescu wrote:
What would be a good solution to forbid certain constructs in the increment part of a for statement?

For this specific case, a clear solution would be to forbid evaluating lambdas as a boolean expression, because they will always be true, and thus almost always an error. Same as with assignments in if statements. If intended, it can be worked around with "!is null".

Reply via email to