__traits(getMember) works only the second time
andre via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Fri Oct 10 04:07:03 PDT 2014
I use the syntax "is(typeof(__traits(getMember, MyType,
"childStr")))" to check whether a member is public visible or
not. (The example above is only a reduced example)
By the way hasMember works correctly.
I will file an issue.
Kind regards
André
On Friday, 10 October 2014 at 07:25:28 UTC, Rikki Cattermole
wrote:
> On 10/10/2014 8:08 p.m., andre wrote:
>
> Wrong trait for the job. Use hasMember instead.
> Although interesting use case. Could be a bug somewhere in
> there.
More information about the Digitalmars-d-learn
mailing list