https://issues.dlang.org/show_bug.cgi?id=16149

          Issue ID: 16149
           Summary: foreach_reverse can't handle index variable of type
                    int
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: dmd
          Assignee: [email protected]
          Reporter: [email protected]

import std.stdio;

void main()
{
    string s = "12345";

    foreach(int i, c; s) {}  // ok
    foreach_reverse(int i, c; s) {} // error
}

---
Compiler msg:
Error: cannot implicitly convert expression (__r1493.length) of type ulong to
int

--

Reply via email to