https://issues.dlang.org/show_bug.cgi?id=16387
Issue ID: 16387
Summary: getSymbolsByUDA works with structs but fails with
classes
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
Severity: normal
Priority: P1
Component: phobos
Assignee: [email protected]
Reporter: [email protected]
Here's an example:
import std.stdio, std.traits;
enum Attr;
void main()
{
struct MyStruct { @Attr uint id; }
class MyClass { @Attr uint id; }
pragma(msg, getSymbolsByUDA!(MyStruct, Attr).stringof); // outputs:
tuple(id)
pragma(msg, getSymbolsByUDA!(MyClass, Attr).stringof); // error
}
--