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

Timon Gehr timon.gehr at gmx.ch
Sun Nov 20 10:03:55 UTC 2022


On 20.11.22 04:20, Walter Bright wrote:
> On 11/19/2022 4:22 AM, Timon Gehr wrote:
>> On 11/19/22 05:22, Walter Bright wrote:
>>> 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.
>>
>> Only if the new feature is actually used,
> 
> Yes, but that would require a significant redo of the semantic routines, 
> which modify the ASTs in-place.
> 

To some extent I think this is the case, but function literals already 
defer the semantic pass in some way, so it seems feasible.


More information about the Digitalmars-d mailing list