Discussion Thread: DIP 1044--Enum Type Inference--Community Review Round 1

Walter Bright newshound2 at digitalmars.com
Tue Nov 22 00:49:22 UTC 2022


On 11/20/2022 1:58 PM, Timon Gehr wrote:
> On 20.11.22 22:32, Walter Bright wrote:
>>
>> But yes, it would be a (small) breaking change.
> 
> I really wouldn't want to run into this:
> 
> ```d
> enum Role{
>      guest,
>      member,
>      developer,
> }
> 
> void main(){
>      Role r;
>      writeln(r); // error
> }
> ```
> 
> Too messy for me, but up to you.

I'm not seeing where the shadowing is?


More information about the Digitalmars-d mailing list