[Issue 16149] New: foreach_reverse can't handle index variable of type int
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Thu Jun 9 12:24:16 PDT 2016
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: nobody at puremagic.com
Reporter: yangacer at gmail.com
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
--
More information about the Digitalmars-d-bugs
mailing list