Beta 2.094.0

Steven Schveighoffer schveiguy at gmail.com
Sun Sep 13 15:12:00 UTC 2020


On 9/13/20 10:52 AM, 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 first part of the change seems disruptive. If you just fix the 
second part (that you can now retrieve all members of std), doesn't it 
fix the problem?

-Steve


More information about the Digitalmars-d-announce mailing list