Foreach with byte problems

Andrej Mitrovic andrej.mitrovich at gmail.com
Fri Feb 25 13:54:57 PST 2011


On 2/25/11, Jonathan M Davis <jmdavisProg at gmx.com> wrote:
> However, it is true that in this particular case, it's annoying. Still, in
> the
> general case, I do believe that it's definitely the right behavior.
>
> - Jonathan M Davis
>

I do agree it's the right thing to do, and I wouldn't want to change it.

But I'd like the compiler to be smart in this case and see that
there's no way 128 will ever be stored into a byte.

It's not some crucial piece of code that I need working. I just ran
into it by accident really.


More information about the Digitalmars-d-learn mailing list