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?

Reply via email to