https://issues.dlang.org/show_bug.cgi?id=19190
Issue ID: 19190 Summary: Circular reference error resolved by getting allMembers Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW Severity: enhancement Priority: P1 Component: dmd Assignee: nob...@puremagic.com Reporter: yshu...@gmail.com Reduced example: struct lr1 { lr1* a; } template proxy(T) { static if (is(typeof(gen!T.str))) enum str = gen!T.str; } template gen(T) if (is(T == struct)) { enum str = T.stringof; private enum xstr = gen!(lr1*).str; } template gen(T: S*, S) { private alias rc = proxy!S; //pragma(msg, __traits(allMembers, rc)); <- uncomment this line resolves error enum str = rc.str~"_ptr"; } enum tmp = proxy!lr1.str; --