[Issue 17906] New: Deprecated functions should not cause deprecated warnings for using deprecated features
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Oct 17 11:48:59 UTC 2017
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: nobody at puremagic.com
Reporter: default_357-line at yahoo.de
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.
--
More information about the Digitalmars-d-bugs
mailing list