Library for image editing and text insertion

rikki cattermole rikki at cattermole.co.nz
Tue Apr 26 21:59:39 UTC 2022


On 27/04/2022 9:55 AM, Guillaume Piolat wrote:
> On Tuesday, 26 April 2022 at 21:44:56 UTC, rikki cattermole wrote:
>>
>> On 27/04/2022 9:39 AM, Guillaume Piolat wrote:
>>> On Tuesday, 26 April 2022 at 21:13:38 UTC, Alexander Zhirov wrote:
>>>> more build errors
>>>
>>> If you "dub upgrade" it should work a bit better.
>>> No success in reproducing the bug here.
>>
>> It definitely on your end.
>>
>> void main() {
>>     int scale;
>>     int* in_ = new int;
>>     ubyte b = cast(int)scale * (cast(int)*in_ >> 7);
>> }
>>
>> onlineapp.d(5): Error: cannot implicitly convert expression `scale * 
>> (*in_ >> 7)` of type `int` to `ubyte`
> 
> No.
> Obviously VRP works differently for me and for him, for an unknown reason.

I copied and pasted the same code that is failing from the file in 
question and put it into that test code.

Putting an int into a ubyte absolutely should error, that is a lossy 
conversion and should not be automatic.


More information about the Digitalmars-d-learn mailing list