[Issue 21892] New: deprecation warning on reflection should be suppressed or at least suppressable
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue May 4 01:16:05 UTC 2021
https://issues.dlang.org/show_bug.cgi?id=21892
Issue ID: 21892
Summary: deprecation warning on reflection should be suppressed
or at least suppressable
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: destructionator at gmail.com
If you loop over the members of an object with deprecated members, the compiler
will issue a deprecation warning. You can use __traits(isDeprecated) to
completely skip these members, but sometimes I want the deprecated members to
be included so I can issue the warning later.
For example, if I'm loading a configuration file based on a reflection struct,
I'd like the deprecation warning to be printed at runtime instead of compile
time. Ditto if doing script language bindings.
So I don't need the deprecation warning out of the D compiler since I'll print
it out of my other code. It would be nice if there was a way to do this.
--
More information about the Digitalmars-d-bugs
mailing list