www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Does UDA not work for enums?

reply Marc <jckj33 gmail.com> writes:
I got compilers errors from this:

 enum E {
 	 ("foo")
 	A,
 	 ("baa")
 	B
 }
I got:
 Error: basic type expected, not  
 Error: no identifier for declarator _error_
 Error: type only allowed if anonymous enum and no enum type
 Error: if type, there must be an initializer
 Error: found   when expecting ,
[...]
Jan 01
parent Seb <seb wilzba.ch> writes:
On Monday, 1 January 2018 at 17:15:24 UTC, Marc wrote:
 I got compilers errors from this:

 enum E {
 	 ("foo")
 	A,
 	 ("baa")
 	B
 }
I got:
 Error: basic type expected, not  
 Error: no identifier for declarator _error_
 Error: type only allowed if anonymous enum and no enum type
 Error: if type, there must be an initializer
 Error: found   when expecting ,
[...]
Vote for and help/improve this DIP: https://github.com/dlang/DIPs/pull/105
Jan 01