[Issue 251] foreach does not allow updating inside with block

BCS BCS at pathlink.com
Fri Jul 14 09:21:00 PDT 2006


Andrei Khropov wrote:
> 
> But I would also like to have a warning or even completely disallow
> modifications of variables in foreach that are not declared as inout.
> The present situation is too error-prone:
> 
[...]
> 
> or maybe just a simple solution is to make them inout by default?
> 

No!!! An error/warning would be enough.



More information about the Digitalmars-d-bugs mailing list