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

IchorDev zxinsworld at gmail.com
Tue Nov 22 03:55:41 UTC 2022


On Tuesday, 22 November 2022 at 00:41:54 UTC, Walter Bright wrote:
> 3. if there were, say, 5 occurrences of $a, each of that which 
> could be 2 different instances to try, what's that, 32 copies
>
> I'm not too thrilled about this.

The moment you know there are 2 instances with different enum 
type parameters that both have an `a` member, you can return an 
error. Also why do you expect 2 functions to look up a member `a` 
in 5 different enums? Just limit the search to the enums in the 
function parameters.


More information about the Digitalmars-d mailing list