http://d.puremagic.com/issues/show_bug.cgi?id=8498
Don <clugd...@yahoo.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |CTFE, wrong-code CC| |clugd...@yahoo.com.au Summary|inconsistent foreach |modifying foreach range |behaviour in CTFE and at |iterator fails in CTFE |runtime | --- Comment #1 from Don <clugd...@yahoo.com.au> 2012-09-03 00:52:40 PDT --- Here's a reduced test case. There are 10 iterations, even though the iteration variable is changed. int fun(){ int r=0; foreach(i;0..10) { ++r; i= 100; assert(i==100); // ok -- but doesn't affect the foreach } return r; } static assert(fun() == 1); Interestingly this is in direct conflict with enhancement bug 6214, which asks for the behaviour we see in CTFE to be used at run time. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------