Hi,

Why doesn't this work? Seems like it should:

enum {
        A = 1,
        version(xx) {
                B = 2
        }
}

void main() {
        
}


Compilation output:
/d732/f174.d(5): Error: basic type expected, not version
/d732/f174.d(5): Error: no identifier for declarator int
/d732/f174.d(5): Error: if type, there must be an initializer
/d732/f174.d(5): Error: found 'version' when expecting ','
/d732/f174.d(5): Error: basic type expected, not (
/d732/f174.d(5): Error: function declaration without return type. (Note that constructors are always named 'this')
/d732/f174.d(5): Error: no identifier for declarator int(xx)
/d732/f174.d(5): Error: if type, there must be an initializer
/d732/f174.d(5): Error: found '{' when expecting ','
/d732/f174.d(8): Error: unrecognized declaration

Reply via email to