Why does this not work?
flamencofantasy via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Wed Sep 17 06:40:34 PDT 2014
Because of overflow.
On Wednesday, 17 September 2014 at 13:36:42 UTC, Shachar Shemesh
wrote:
> 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