d: Enable private member access for __traits
authorIain Buclaw <ibuclaw@gdcproject.org>
Thu, 21 Jan 2021 09:31:36 +0000 (10:31 +0100)
committerIain Buclaw <ibuclaw@gdcproject.org>
Thu, 21 Jan 2021 13:54:48 +0000 (14:54 +0100)
commit279d3a89b79f85d07a8ac4db1bebe9f60cb549e5
tree45e70aa6786f0a138370903a8dbc749aeb3359eb
parente154009f35a74edffda42b77b806a1fb8591d4c0
d: Enable private member access for __traits

The following traits can now access non-public members:
 - hasMember
 - getMember
 - getOverloads
 - getVirtualMethods
 - getVirtualFuntions

This fixes a long-standing issue in D where the allMembers trait would
correctly return non-public members but those non-public members would
be inaccessible to other traits.

Reviewed-on: https://github.com/dlang/dmd/pull/12135

gcc/d/ChangeLog:

* dmd/MERGE: Merge upstream dmd 3a7ebef73.
gcc/d/dmd/MERGE
gcc/d/dmd/traits.c
gcc/testsuite/gdc.test/compilable/imports/test15371.d [new file with mode: 0644]
gcc/testsuite/gdc.test/compilable/test15371.d [new file with mode: 0644]