allMembers broke for __
Timon Gehr
timon.gehr at gmx.ch
Mon Jun 18 10:54:34 UTC 2018
On 18.06.2018 00:55, Walter Bright wrote:
> On 6/15/2018 11:08 PM, DigitalDesigns wrote:
>> When an identifier starts with __, allMembers does not return it. This
>> is very bad behavior! It can silently create huge problems if the
>> programmer is not aware of the bug.
>
>
> It's not a bug, it's quite deliberate:
>
> https://github.com/dlang/dmd/blob/master/src/dmd/traits.d#L1385
>
>
> Identifiers starting with __ are reserved for the implementation:
>
> https://dlang.org/spec/lex.html#identifiers
>
> They have implementation-defined behavior. Do not use them in user code.
The code you linked to does it. :)
More information about the Digitalmars-d
mailing list