https://issues.dlang.org/show_bug.cgi?id=16149
--- Comment #6 from Ketmar Dark <ket...@ketmar.no-ip.org> --- (In reply to Steven Schveighoffer from comment #5) > int x = a.length would continue to be invalid (on 64-bit CPU). It's just for > foreach_reverse. then i'll inevitably ask why `int x = a.length;` is invalid, but `foreach_reverse (int x, v; a)` is valid. that `foreach` obviously does the assign under the hood (at least this is the most practical way to imagine it). the only way to skip that "hidden assign" is to redefive `foreach_reverse` completely — by still using increasing index in it, so x will go from 0 upto limit. otherwise you just introducing a random pseudo-solution by randomly breaking the rules. --