enum E {
@(1) v1
}
void main() {}
$ dmd t
t.d(2): Error: basic type expected, not @
t.d(2): Error: type only allowed if anonymous enum and no enum type
t.d(2): Error: if type, there must be an initializer
t.d(2): Error: found '@' when expecting ','
t.d(2): Error: basic type expected, not (
t.d(2): Error: unexpected ( in declarator
t.d(2): Error: basic type expected, not 1
t.d(2): Error: found '1' when expecting ')'
t.d(2): Error: type only allowed if anonymous enum and no enum type
t.d(2): Error: if type, there must be an initializer
t.d(2): Error: found ')' when expecting ','
Comment #1 by TeddyBear12311 — 2017-01-20T21:17:37Z
What the heck?? 4 years and this hasn't been fixed?!?!?!
Comment #2 by sprink.noreply — 2017-01-20T22:06:15Z
(In reply to TeddyBear12311 from comment #1)
> What the heck?? 4 years and this hasn't been fixed?!?!?!
There was a pull request done a while back, but seems this needs a DIP?
https://github.com/dlang/dmd/pull/6161
Comment #3 by github-bugzilla — 2018-06-27T07:06:51Z
dlang/dmd pull request #12108 "[dmd-cxx] Support deprecated, @disable and user-defined attributes on enum members" was merged into dmd-cxx:
- b39ef4eda243848cc532bc5352956c129bc3d320 by JinShil:
[dmd-cxx] Fix Issue 9701 - allow UDAs to be attached to enum values
https://github.com/dlang/dmd/pull/12108