[Issue 16437] New: Enum type inference
    via Digitalmars-d-bugs 
    digitalmars-d-bugs at puremagic.com
       
    Sat Aug 27 12:00:07 PDT 2016
    
    
  
https://issues.dlang.org/show_bug.cgi?id=16437
          Issue ID: 16437
           Summary: Enum type inference
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: b2.temp at gmx.com
inference of the enum type in function calls, allowing to type only the member
Enum A{a0}
void foo(A a);
a0.foo; // OK
void bar(T)(T t);
a0.bar; // ERROR
void baz(A[] a);
[a0].baz; //OK
void cli(A a)();
cli!a0; // OK
This could be accepted as long as the parameter type is not inferred since the
parameter type will have to be used to find a match in the enum.
--
    
    
More information about the Digitalmars-d-bugs
mailing list