digitalmars.D.learn - DMD chokes on UDAs of mixin enum members
I've got some code that reduces to the following test case: ------ mixin template stuff() { enum someEnum = "testing"; static void test() { foreach(member; __traits(allMembers, typeof(this))) { pragma(msg, member); foreach(attribute; __traits(getAttributes, __traits(getMember, typeof(this), member))) { pragma(msg, attribute); } } } } enum Attribute; struct Test { mixin stuff; Attribute size_t n; } ------ DMD handles most of the members just fine, but it is unable to process someEnum: ------rdmd case.dsomeEnum case.d(7): Error: first argument is not a symbol case.d(7): Error: invalid foreach aggregate false test n Attribute ------ Is there some subtle point I'm missing, or is this just a bug?
Apr 26 2013
On Friday, 26 April 2013 at 21:50:51 UTC, BLM768 wrote: [...]Is there some subtle point I'm missing, or is this just a bug?Looks like http://d.puremagic.com/issues/show_bug.cgi?id=9652
Apr 26 2013
That's probably it. I guess I'll have to work around it for now. On Saturday, 27 April 2013 at 00:21:02 UTC, anonymous wrote:On Friday, 26 April 2013 at 21:50:51 UTC, BLM768 wrote: [...]Is there some subtle point I'm missing, or is this just a bug?Looks like http://d.puremagic.com/issues/show_bug.cgi?id=9652
Apr 26 2013