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

--- Comment #2 from Basile-z <[email protected]> ---
somewhat better. Static evaluation is known to have problems with shortcut &&
and ||:

```
module self;

enum getMember = `__traits(getMember, sym, m)`;

template test(alias sym)
{
    static foreach (m; __traits(allMembers, sym))
    {
        static if (m == "object")
            static if (is(__traits(getMember, sym, "object")==module))
                static assert(0);      // pass
        static if (m == "object")
            static if (is(mixin(getMember)==module))
                static assert(0, m);   // fails
    }
}

void main()
{
    alias _ = test!(self);
}     
```

--

Reply via email to