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

          Issue ID: 17906
           Summary: Deprecated functions should not cause deprecated
                    warnings for using deprecated features
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: dmd
          Assignee: [email protected]
          Reporter: [email protected]

Currently I'm running into lots of deprecated warnings on functions that I
don't call but that *themselves* use deprecated features.

Example:

import std.optional; // Optional is deprecated in favor of nullable
// foo warns, even if it is not called, because it uses a deprecated feature.
// No duh, that's why it's marked 'deprecated'.
deprecated void foo(Optional!bool b);

In my opinion, D should not generate deprecated warnings for deprecated
features used in contexts which are themselves deprecated, since the only way
to get to them incurs a deprecated warning *already*, since the user will
already be warned about deprecation via the outer "deprecated" tag.

--

Reply via email to