Thread overview | |||||
---|---|---|---|---|---|
|
August 05, 2018 getProtection gives different result when member is accessed via getMember | ||||
---|---|---|---|---|
| ||||
file1.d: import std.stdio; file2.d: import file1; pragma(msg, __traits(getProtection, __traits(getMember, m1, "std"))); // public pragma(msg, __traits(getProtection, m1.std)); // private Bug? Intended? |
August 06, 2018 Re: getProtection gives different result when member is accessed via getMember | ||||
---|---|---|---|---|
| ||||
Posted in reply to Yuxuan Shui | On Sunday, 5 August 2018 at 01:48:08 UTC, Yuxuan Shui wrote:
> file1.d:
> import std.stdio;
>
> file2.d:
> import file1;
> pragma(msg, __traits(getProtection, __traits(getMember, m1, "std"))); // public
> pragma(msg, __traits(getProtection, m1.std)); // private
>
> Bug? Intended?
It's a bug since in both cases it's the same symbol how can the result be different ?
|
August 06, 2018 Re: getProtection gives different result when member is accessed via getMember | ||||
---|---|---|---|---|
| ||||
Posted in reply to Yuxuan Shui | On Sunday, 5 August 2018 at 01:48:08 UTC, Yuxuan Shui wrote: > file1.d: > import std.stdio; > > file2.d: > import file1; > pragma(msg, __traits(getProtection, __traits(getMember, m1, "std"))); // public > pragma(msg, __traits(getProtection, m1.std)); // private > > Bug? Intended? reported for you https://issues.dlang.org/show_bug.cgi?id=19144 |
Copyright © 1999-2021 by the D Language Foundation