[Issue 9087] Value modified in foreach warning

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Nov 28 14:28:40 PST 2012


http://d.puremagic.com/issues/show_bug.cgi?id=9087



--- Comment #8 from bearophile_hugs at eml.cc 2012-11-28 14:28:39 PST ---
(In reply to comment #7)

> and in my code the unwanted modification of a struct in a foreach loop

The problem is the opposite, sorry. I was trying to modify the struct, but no
actual change of the original struct was happening.

I have explained this topic very well elsewhere to Walter, and it seems that
even him has a hard time understanding this very simple problem and situation.
See for some of my explanations:

http://forum.dlang.org/thread/znbtczbgipqqzllafmzk@forum.dlang.org

http://forum.dlang.org/thread/k7afq6$2832$1@digitalmars.com?page=7#post-kothvmmjkrgtcfzcxohj:40forum.dlang.org

http://forum.dlang.org/thread/k7afq6$2832$1@digitalmars.com?page=8#post-hrfjeobyzdmajlhjdivf:40forum.dlang.org

http://forum.dlang.org/thread/k7afq6$2832$1@digitalmars.com?page=10#post-zhrnkzjtaaosmizmqdtk:40forum.dlang.org

http://forum.dlang.org/thread/k7afq6$2832$1@digitalmars.com?page=12#post-hqdihcnzzgnlfvznhqbc:40forum.dlang.org

Take a look especially at the first and last of those links.

-- 
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