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.

Reply via email to