Re: What is this behavior and how do I disable or get around it?

2016-09-04 Thread Jonathan M Davis via Digitalmars-d-learn
On Monday, September 05, 2016 00:26:01 pineapple via Digitalmars-d-learn wrote: > This program does not compile. > > Error: cannot implicitly convert expression (cast(int)x - > cast(int)x) of type int to ubyte > > void main(){ > ubyte x; > x = x - x; > } > > I don't

Re: What is this behavior and how do I disable or get around it?

2016-09-04 Thread Mike Parker via Digitalmars-d-learn
On Monday, 5 September 2016 at 00:26:01 UTC, pineapple wrote: This program does not compile. Error: cannot implicitly convert expression (cast(int)x - cast(int)x) of type int to ubyte void main(){ ubyte x; x = x - x; } I don't even know what to say. Who thought this

Re: What is this behavior and how do I disable or get around it?

2016-09-04 Thread ak via Digitalmars-d-learn
On Monday, 5 September 2016 at 00:26:01 UTC, pineapple wrote: This program does not compile. Error: cannot implicitly convert expression (cast(int)x - cast(int)x) of type int to ubyte void main(){ ubyte x; x = x - x; } I don't even know what to say. Who thought this

What is this behavior and how do I disable or get around it?

2016-09-04 Thread pineapple via Digitalmars-d-learn
This program does not compile. Error: cannot implicitly convert expression (cast(int)x - cast(int)x) of type int to ubyte void main(){ ubyte x; x = x - x; } I don't even know what to say. Who thought this behavior was a good idea?