[Issue 24607] __traits(isDeprecated, ...) not working on a member

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Jun 17 09:52:24 UTC 2024


https://issues.dlang.org/show_bug.cgi?id=24607

Nick Treleaven <nick at geany.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |nick at geany.org
           Severity|enhancement                 |normal

--- Comment #1 from Nick Treleaven <nick at geany.org> ---
> pragma(msg, __traits(isDeprecated, A, "foo")));

The docs say it takes only one argument (like other trait docs), though
actually the result is true if both A and "foo" are deprecated. 

https://dlang.org/spec/traits.html#isDeprecated

> Should support checking on member
> pragma(msg, __traits(isDeprecated, A.bar3));

That is actually the correct syntax, but the result is false when it should be
true.

(I am adding a member symbol example in this pull
https://github.com/dlang/dlang.org/pull/3851).

--


More information about the Digitalmars-d-bugs mailing list