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

Stefan Koch uplink.coder at googlemail.com
Wed Nov 23 18:06:58 UTC 2022


On Wednesday, 23 November 2022 at 05:01:58 UTC, IchorDev wrote:
> Nobody mentioned it here yet, so I figured I'd point out that 
> the wonderful UplinkCoder has made a partial implementation of 
> this DIP.
> You can find the PR for it here: 
> https://github.com/dlang/dmd/pull/14650
>
> They have implemented a great deal of the proposed features in 
> less than a day. They said ETI overloaded functions are 
> incomplete and may take some time to finish, but I think that 
> their progress so far demonstrates just how simple a feature 
> ETI really is.

Thanks for mentioning it.

I think overloaded functions should work now.

The cause of the issue turned out to be a straightforward bug in 
my code.
which caused the type to be set even if the enum member inference 
failed.
Which meant the expression got typed as the first enum declared 
in the.
Simply moving the setting of the type until after the check for a 
vaild inference;
Fixed that bug.

TLDR; the PR _should_ now implement the DIP largely the way it's 
discribed.


More information about the Digitalmars-d mailing list