https://issues.dlang.org/show_bug.cgi?id=16149
--- Comment #2 from Acer.Yang <[email protected]> --- (In reply to Ketmar Dark from comment #1) > ...and, techincally, it shouldn't. > > first case (roughly) does: `int i; while (i < s.length) ...` which is > perfectly legal. but second does: `int i = s.length;`, which requires > conversion from `size_t` (of type `ulong` on 64-bit arch) to `int`, which is > illegal. > > i'd say that first case should be forbidden too, but the seconds case -- in > my opinion -- doesn't require fixing. I agree that the first case should be forbidden(since signed/unsigned comparison is not safe per my eyes). --
