[Issue 22214] Regression 2.097.0: __traits(compiles) doesn't notice invalid getMember that yields type

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Aug 16 12:13:25 UTC 2021


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

--- Comment #1 from FeepingCreature <default_357-line at yahoo.de> ---
Simplified:

struct S
{
    struct T
    {
    }
}

void main() {
    const S s;
    static if (__traits(compiles, { auto t = s.T; }))
    {
        auto t = s.T;
    }
}

--


More information about the Digitalmars-d-bugs mailing list