Please tell me this is a bug?

Almighty Bob via Digitalmars-d digitalmars-d at puremagic.com
Sat Feb 21 17:24:08 PST 2015


D version 2.066.1

int a = 42;
float b = 19;

a = b; // Error: cannot implicitly convert expression (b) of type 
float to int

a = a+b; // Error: cannot implicitly convert expression (b) of 
type float to int

but...

a += b; // Compiles with no ERROR!

Please tell me that's a bug?


More information about the Digitalmars-d mailing list