allMembers broke for __
Walter Bright
newshound2 at digitalmars.com
Sun Jun 17 22:55:57 UTC 2018
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.
More information about the Digitalmars-d
mailing list