[Issue 9087] Value modified in foreach warning
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Nov 27 19:31:56 PST 2012
http://d.puremagic.com/issues/show_bug.cgi?id=9087
--- Comment #1 from Kenji Hara <k.hara.pg at gmail.com> 2012-11-27 19:31:53 PST ---
(In reply to comment #0)
> Currently (DMD 2.061alpha) this code generates a warning:
>
> // program#1
> void main() {
> foreach (i; 0 .. 10)
> i++;
> }
>
> test.d(4): Warning: variable modified in foreach body requires ref storage
> class
This is the *temporary* warning in progress of fixing bug 6652. Finally, the
warning will be disappeared and modifying non-ref foreach key will be
acceptable.
This means that the warning is not for the purpose you hope.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list