[Issue 8498] New: inconsistent foreach behaviour in CTFE and at runtime

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Aug 2 13:54:09 PDT 2012


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: nobody at puremagic.com
        ReportedBy: timon.gehr at gmx.ch


--- Comment #0 from timon.gehr at 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: -------


More information about the Digitalmars-d-bugs mailing list