On Sunday, 13 September 2020 at 14:52:13 UTC, MrSmith wrote:
On Friday, 11 September 2020 at 07:48:00 UTC, Martin Nowak wrote:
Glad to announce the first beta for the 2.094.0 release, ♥ to the 49 contributors.

This is the first release to be built with LDC on all platforms, so we'd welcome some more thorough beta testing.

http://dlang.org/download.html#dmd_beta
http://dlang.org/changelog/2.094.0.html

As usual please report any bugs at
https://issues.dlang.org

-Martin

One unfortunate sideeffect of allMembers change is that it breaks this king of loop:
```
foreach(m; __traits(allMembers, M)) { // M is module
alias member = __traits(getMember, M, m); // now fails because std.stdio is not a member of M
}
```

To fix I needed to rewrite it as:
```
foreach(m; __traits(allMembers, M)) { // M is module
    static if (__traits(compiles, __traits(getMember, M, m)))
        alias member = __traits(getMember, M, m);
}
```

the technic to filter out is:

```
foreach(m; __traits(allMembers, M)) { // M is module
  static if (!is(mixin(m) == module))
    static if (!is(mixin(m) == package))
{
  ....
}
```

BTW this is not a side-effect. This is the desired effect. That worked previously because the allmembers tuple was incorrect.

Reply via email to