www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 21892] New: deprecation warning on reflection should be

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 puremagic.com
          Reporter: destructionator 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.

--
May 03 2021