[Issue 19190] Circular reference error resolved by getting allMembers

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Aug 25 15:54:51 UTC 2018


https://issues.dlang.org/show_bug.cgi?id=19190

--- Comment #2 from Yuxuan Shui <yshuiv7 at gmail.com> ---
The behavior of the compiler seems to be sensitive to pragma:

...
// This is the second `gen`
template gen(T: S*, S) {
    private alias rc = proxy!S;
    pragma(msg, is(typeof(rc.str))); // false
    //pragma(msg, __traits(allMembers, rc));
    enum str = rc.str~"_ptr";
}

Above version generate:

package.d(19): Error: variable `package.gen!(lr1*, lr1).str` had semantic
errors when compiling

--


More information about the Digitalmars-d-bugs mailing list