[Issue 19190] New: Circular reference error resolved by getting allMembers
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Aug 25 15:31:24 UTC 2018
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: nobody at puremagic.com
Reporter: yshuiv7 at 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;
--
More information about the Digitalmars-d-bugs
mailing list