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.
Comment #1 by andrej.mitrovich — 2013-10-05T16:19:42Z