--- Comment #2 from 2011-09-12 14:35:51 PDT ---
Making a const/immutable copy is not the right solution to this.
Instead a mutable copy of a hidden loop variable should be made.
Being a copy is the common behavior for non-ref foreach arguments,
to my surprise it has even become my intuitive assumption of what's happening.
The old behavior can be achieved through a ref argument.

not possible using const:
foreach(i; 1 .. 10)
  while(i--) { do some }

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to