Why does this not work?

Shachar Shemesh via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Wed Sep 17 06:36:41 PDT 2014


On 17/09/14 16:32, ketmar via Digitalmars-d-learn wrote:
> On Wed, 17 Sep 2014 13:20:13 +0000
> Shachar via Digitalmars-d-learn <digitalmars-d-learn at puremagic.com>
> wrote:
>
>>   From http://dlang.org/type, under Usual Arithmetic Conversions:
>> 4. Else the integer promotions are done on each operand, followed
>> by:
>>       1. If both are the same type, no more conversions are done.
> it's bug in specs, i believe, 'cause compiler promotes smaller types to
> int/uint.
>

I don't understand. Why is this behavior preferrable to the one outlined 
by the specs?

Thanks,
Shachar


More information about the Digitalmars-d-learn mailing list