how to determine of a module or any other symbol is visible?

Cauterite cauterite at gmail.com
Mon Jun 18 11:53:50 UTC 2018


On Monday, 18 June 2018 at 09:28:00 UTC, rikki cattermole wrote:
> On 18/06/2018 9:24 PM, Mr.Bingo wrote:
>> On Monday, 18 June 2018 at 09:10:59 UTC, rikki cattermole 
>> wrote:
>> This doesn't work with depreciation warnings.
>
> There won't be a way to check for those (I think).
> Easier to not worry about them until it turns into errors.

you can try the -de flag:

// foo.d:
deprecated void foo() {}
pragma(msg, __traits(compiles, foo()));

---

dmd foo.d
-> true

dmd -de foo.d
-> false

---

couldn't think of any examples of deprecated visibility to try 
though


More information about the Digitalmars-d-learn mailing list