Foreach Access Violation

Chris R. Miller lordsauronthegreat at gmail.com
Mon Oct 20 23:00:20 PDT 2008


BCS wrote:
> IIRC the docs say is it illegal to alter the loop array inside of a foreach

Hmm, I wonder if it would be possible to make the loop array's length 
constant (immutable, whatever we're using today) in the loop so as to 
catch the bug at compile time.  At my current state of unenlightened 
thinking I don't think it'd be necessarily hard to do - but I'm not 
in-the-know, so I'm just bouncing an idea around.



More information about the Digitalmars-d mailing list