[Issue 10818] New: Allow parameterized enum declaration

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Aug 13 08:49:38 PDT 2013


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

           Summary: Allow parameterized enum declaration
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: k.hara.pg at gmail.com


--- Comment #0 from Kenji Hara <k.hara.pg at gmail.com> 2013-08-13 08:49:37 PDT ---
Aggregate declarations could have optional template parameters.

class C1 {}
class C2(T) {}

interface I1 {}
interface I2(T) {}

struct S1 {}
struct S2(T) {}

union U1 {}
union U2(T) {}

Similarly, parameterized enum declaration would increase language consistency.

enum E1 {}
enum E2(T) {}
enum E2(T) if (constraint) {}
enum E2(T) : T {}
enum E2(T) if (constraint) : T {}
enum E2(T) : T if (constraint) {}

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


More information about the Digitalmars-d-bugs mailing list