[Issue 16149] foreach_reverse can't handle index variable of type int
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Sun Jun 12 04:50:21 PDT 2016
https://issues.dlang.org/show_bug.cgi?id=16149
--- Comment #5 from Steven Schveighoffer <schveiguy at yahoo.com> ---
int x = a.length would continue to be invalid (on 64-bit CPU). It's just for
foreach_reverse.
What feels wrong is the OP's code that I can foreach some array in a certain
way, but not foreach reverse the identical thing.
My point was that foreach_reverse with a smaller index is valid for all cases
that foreach with a smaller index is valid. But foreach we allow and
foreach_reverse we disallow. Seems arbitrary.
--
More information about the Digitalmars-d-bugs
mailing list