https://d.puremagic.com/issues/show_bug.cgi?id=12504

           Summary: Wrong 'cannot cover index range' error message
           Product: D
           Version: D2
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Keywords: diagnostic, rejects-valid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: [email protected]
        ReportedBy: [email protected]


--- Comment #0 from [email protected] 2014-04-01 15:40:09 PDT ---
void main() {
    int[256] data;
    foreach (ubyte i; 0 .. data.length) {} // OK
    foreach (ubyte i, x; data) {}          // Error
}


test.d(4,5): Error: index type 'ubyte' cannot cover index range 0..256

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

Reply via email to