Enum literals, good? bad? what do you think?

Patrick Schluter Patrick.Schluter at bbox.fr
Thu Jul 22 08:58:41 UTC 2021


On Thursday, 22 July 2021 at 08:51:12 UTC, Basile B. wrote:
> On Thursday, 22 July 2021 at 08:41:55 UTC, Patrick Schluter 
> wrote:
>> On Thursday, 22 July 2021 at 07:49:23 UTC, Basile B. wrote:
>>> On Thursday, 22 July 2021 at 07:42:33 UTC, Patrick Schluter 
>>> wrote:
>>>> [...]
>>>
>>> Sorry for the massive disapointment but it can : 
>>> https://run.dlang.io/is/ktKQPT.
>>
>> ```d
>> -	enum ENUM { A, B, C }
>> +	enum ENUM : ubyte { A, B, C }
>> ```
>>
>> You should have put your change also on the forum so that 
>> everyone can see.
>>
>> Yes, that's indeed a problem but IMHO it's a bug due to int 
>> promotion rule.
>
> Yes it is definitively a bug, I know it already but I could not 
> resist to recall to the community that it exists, as your 
> example matched _perfectly_.
>
> sorry ;)

Don't be sorry when what you say is true. :-)


More information about the Digitalmars-d mailing list