Array initialization quiz
deadalnix
deadalnix at gmail.com
Tue Nov 29 04:59:54 PST 2011
Le 29/11/2011 04:11, Andrej Mitrovic a écrit :
> On 11/29/11, bearophile<bearophileHUGS at lycos.com> wrote:
>> Do you know why the compiler doesn't ask you for a cast, and why the run
>> does that?
>
> Because foreach is broken?
> http://d.puremagic.com/issues/show_bug.cgi?id=4510
No it has nothing to do with this bug. But actually, this exemple should
generate a warning at least, or being illegal eventually. I being ubyte,
the max value is 255, so you always ends up with a valid value of i and
the loop never stop.
More information about the Digitalmars-d-learn
mailing list