Please tell me this is a bug?

Peter Alexander via Digitalmars-d digitalmars-d at puremagic.com
Sat Feb 21 18:29:38 PST 2015


On Sunday, 22 February 2015 at 02:15:29 UTC, Almighty Bob wrote:
> "Assign Expressions:
> The right operand is implicitly converted to the type of the 
> left operand"
>
> which quite clearly is not the case since...
>
> a=b; // causes an error. but..
> a+=b; // does not.

float does not *implicitly* convert to int. Required explicit 
coercion, which is what the opAssign expression does.


More information about the Digitalmars-d mailing list