Is this a bug?

Ali Çehreli via Digitalmars-d digitalmars-d at puremagic.com
Sat Dec 10 00:23:06 PST 2016


On 12/10/2016 12:16 AM, Is it possible to store different generic types? 
wrote:

 > Okay the issue seem to be that D casts the left-hand argument to the
 > same type as the right-hand argument.

Seems to be but not true. It's more like "anything that touches an 
unsigned type turns unsigned". :)

   https://dlang.org/spec/type.html#integer-promotions

The more important topic there is the second one: "Usual Arithmetic 
Conversions"

Ali



More information about the Digitalmars-d mailing list