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

Walter Bright newshound2 at digitalmars.com
Sat Nov 19 04:22:39 UTC 2022


Consider this:

     enum A { a; }
     enum B { a; }

     void f(A);
     void f(B);

     ...
     f($a + $a); // mentioned in the DIP as allowed
     ...

Since the DIP allows expressions containing such enum inferences, it looks like 
we are faced with the possibility of having to re-run the semantic pass for enum 
arguments for every enum overload.


More information about the Digitalmars-d mailing list