digitalmars.D.bugs - [Issue 21352] New: enum members should not be given UDAs of type
- d-bugmail puremagic.com (29/29) Oct 31 2020 https://issues.dlang.org/show_bug.cgi?id=21352
https://issues.dlang.org/show_bug.cgi?id=21352 Issue ID: 21352 Summary: enum members should not be given UDAs of type Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: normal Priority: P1 Component: dmd Assignee: nobody puremagic.com Reporter: zan77137 nifty.com This code is broken: -------------------------------- ("aaa") enum Hoge { ("bbb") foo, // tuple("aaa", "bbb") -> should be only tuple("bbb") bar, // tuple() } ("aaa") struct Fuga { ("bbb") int foo; // tuple("bbb") int bar; // tuple() } static assert([__traits(getAttributes, Hoge.foo)] == ["bbb"]); //NG static assert([__traits(getAttributes, Hoge.bar)] == []); static assert([__traits(getAttributes, Fuga.foo)] == ["bbb"]); static assert([__traits(getAttributes, Fuga.bar)] == []); -------------------------------- --
Oct 31 2020