http://d.puremagic.com/issues/show_bug.cgi?id=11177

           Summary: parameterized enum can't be typed
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: [email protected]
        ReportedBy: [email protected]


--- Comment #0 from [email protected] 2013-10-05 13:53:34 PDT ---
The new parameterized/template enum can't be typed.

//----
enum int a    = 5; //OK, a is an enum of type int
enum     b(T) = 5; //OK, b is a template enum is of type infered
template c(T){enum int c = 5;}//OK, c is a template enum is of type int
enum int d(T) = 5; //???
//----

main.d(d): Error: semicolon expected following function declaration
main.d(d): Error: Declaration expected, not '='

I'm not sure what the rules of DIP 42 state on this, but it seems strange this
doesn't work.

I think dmd is getting confused by into thinking I'm declaring a function, but
the "=" and "enum" should mean there is no ambiguity here, and it should be
accepted. I think.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to