[Issue 18617] need __traits(deprecated, expr) to check whether an expression would trigger deprecation
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Sep 10 03:34:36 UTC 2019
https://issues.dlang.org/show_bug.cgi?id=18617
Dlang Bot <dlang-bot at dlang.rocks> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
--- Comment #3 from Dlang Bot <dlang-bot at dlang.rocks> ---
dlang/dmd pull request #10398 "Fix Issue 18617 - Need ability to check if a
symbol would trigger a deprecation" was merged into master:
- 54574166b70cb0fd03cf5305833c4088923b7976 by Geod24:
Fix Issue 18617 - Need ability to check if a symbol would trigger a
deprecation
... without triggering it !
__traits(isDeprecated, Symbol) currently triggers a deprecation message,
which makes it pretty useless for library writers.
Note that a pitfall is that a library would fail to get a deprecation
message,
leading to a failure to remove the access to a symbol if the symbol is
hard-coded.
However, the prime usage of __traits(isDeprecated) is for meta-programming,
hence it shouldn't be a problem in practice.
https://github.com/dlang/dmd/pull/10398
--
More information about the Digitalmars-d-bugs
mailing list