Thread overview
[Issue 24857] Unknown error while instantiating: __traits(compiles) hides the real issue
November 13
https://issues.dlang.org/show_bug.cgi?id=24857

Nick Treleaven <nick@geany.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |nick@geany.org

--- Comment #1 from Nick Treleaven <nick@geany.org> ---
I couldn't reduce it any more than this:

```
template AllMembersInModule(alias Module) {
    import std.meta : Filter;
    alias all_members = __traits(allMembers, Module);

    template CanAccess(string member) {
        enum CanAccess = __traits(compiles, __traits(getMember, Module,
member));
    }
    alias x = Filter!(CanAccess, all_members);

    alias AllMembersInModule = y;
}

alias AllMembers = AllMembersInModule!(__traits(parent, {}));
pragma(msg, AllMembers); // added
```

Error: unknown, please file report on issues.dlang.org
aliastypo.d(15):        while evaluating `pragma(msg, AllMembers)`

--
November 13
https://issues.dlang.org/show_bug.cgi?id=24857

Luís Ferreira <contact@lsferreira.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |accepts-invalid,
                   |                            |ice-on-invalid-code,
                   |                            |industry
                 CC|                            |contact@lsferreira.net

--
November 13
https://issues.dlang.org/show_bug.cgi?id=24857

Luís Ferreira <contact@lsferreira.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Hardware|x86                         |All
                 OS|Mac OS X                    |All

--