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

claptrap clap at trap.com
Tue Nov 22 12:31:52 UTC 2022


On Tuesday, 22 November 2022 at 12:27:41 UTC, claptrap wrote:
> On Tuesday, 22 November 2022 at 09:37:43 UTC, bauss wrote:
>> On Tuesday, 22 November 2022 at 05:55:04 UTC, rikki cattermole 
>> wrote:

>> So if you type .a then it will first look in module scope, 
>> then in enums that are in scope and at last within classes 
>> that are in scope.
>
> Why not an error if it's ambiguous? There are ways to specify 
> which you want if needed. And its probably unlikely enough that 
> occasionally having to specify the enum name is not anything to 
> be concerned about.

Maybe somebody could scan some github repos and find out how 
often there's an enum member name that clashes with something in 
module scope? Would that be hard to do?


More information about the Digitalmars-d mailing list