Thread overview |
---|
April 26, 2013 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.d
someEnum
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?
|
April 27, 2013 Re: DMD chokes on UDAs of mixin enum members | ||||
---|---|---|---|---|
| ||||
Posted in reply to BLM768 | 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 |
April 27, 2013 Re: DMD chokes on UDAs of mixin enum members | ||||
---|---|---|---|---|
| ||||
Posted in reply to anonymous | 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
|
Copyright © 1999-2021 by the D Language Foundation