[Issue 21352] New: enum members should not be given UDAs of type
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Oct 31 08:47:03 UTC 2020
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 at puremagic.com
Reporter: zan77137 at 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)] == []);
--------------------------------
--
More information about the Digitalmars-d-bugs
mailing list