I have a feature request: "Named enum scope inference"

Tommi tommitissari at hotmail.com
Fri Sep 28 21:06:24 PDT 2012


So, these would be the new rules we'd give to the compiler:

1) See if you can compile the code exactly the way you've been 
doing it thus far. If it compiles, great, we're done.

2) Else, if there are undefined identifiers that are passed to 
places where named enum variables are expected, try to see if 
prefixing those identifier names with the expected enum type name 
(plus a dot) would make the code compile.

This wouldn't break any existing code, and to me the rule seems 
intuitive enough.


More information about the Digitalmars-d mailing list