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

           Summary: inconsistent foreach behaviour in CTFE and at runtime
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: regression
          Priority: P2
         Component: DMD
        AssignedTo: nob...@puremagic.com
        ReportedBy: timon.g...@gmx.ch


--- Comment #0 from timon.g...@gmx.ch 2012-08-02 13:54:00 PDT ---
Passes with DMD 2.059, asserts with DMD 2.060:

int fun(){
    int r;
    foreach(i;0..10) r+=i++;
    return r;
}
enum x = fun();
void main(){ assert(fun()==x); }

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to