June 16, 2014
https://issues.dlang.org/show_bug.cgi?id=12934

          Issue ID: 12934
           Summary: Strange newly implemented VRP behavior on foreach
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P1
         Component: DMD
          Assignee: nobody@puremagic.com
          Reporter: k.hara.pg@gmail.com

Example case:

void main()
{
    ubyte[128] data;
    foreach (const int  i; 0..128) data[i] = i;  // ok by issue 9570
    foreach (const(int) i; 0..128) data[i] = i;  // should work, but doesn't
}

--