Minimized case: enum Attribute; @Attribute class MyTemplate(T) { } @Attribute class MyType { } pragma(msg, __traits(getAttributes, MyTemplate)); // prints: tuple() pragma(msg, __traits(getAttributes, MyTemplate!uint)); // prints: tuple((Attribute)) pragma(msg, __traits(getAttributes, MyType)); // prints: tuple((Attribute)) I think it either result should be the same for non-instantiated type as for instantiated or pragma(msg, __traits(getAttributes, MyTemplate)) should yeld a compile time error.
working as expected since v2.065.0