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

Steven Schveighoffer <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]

--- Comment #1 from Steven Schveighoffer <[email protected]> ---
I looked at the errors:
/Users/steves/.dvm/compilers/dmd-2.071.1/osx/bin/../../src/phobos/std/range/package.d(4751):
Error: cannot implicitly convert expression (cast(int)pastLast - 1) of type int
to ushort
/Users/steves/.dvm/compilers/dmd-2.071.1/osx/bin/../../src/phobos/std/range/package.d(4756):
Error: cannot implicitly convert expression (cast(int)pastLast + 1) of type int
to ushort
/Users/steves/.dvm/compilers/dmd-2.071.1/osx/bin/../../src/phobos/std/range/package.d(4773):
Error: cannot implicitly convert expression (cast(int)this.pastLast -
cast(int)this.step) of type int to inout(ushort)

We are just adding/subtracting 1 or step in each of these. Just cast to the
correct type, should be sufficient. Alternatively, you can use += or -=
instead.

May need to `static if` this fix for only builtin types, as custom types
probably already handle the operations correctly, and we don't want to mess
with that.

--

Reply via email to