Annoyance with new integer promotion deprecations

Steven Schveighoffer schveiguy at yahoo.com
Mon Feb 5 20:23:20 UTC 2018


On 2/5/18 2:30 PM, H. S. Teoh wrote:
> Even better yet:
> 
> 	byte b;
> 	b = -b;		// Deprecation error
> 
> WAT????

In the future, -b will be typed as an int, so you can't reassign it to 
b. You can see this today with -transition=intpomote:

Error: cannot implicitly convert expression -cast(int)b of type int to byte

-Steve


More information about the Digitalmars-d mailing list