Bug 20840 – No deprecation when using template from deprecated selective import

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2020-05-18T16:05:48Z
Last change time
2020-05-23T03:42:55Z
Keywords
pull
Assigned to
No Owner
Creator
moonlightsentinel

Comments

Comment #0 by moonlightsentinel — 2020-05-18T16:05:48Z
dmd fails to issue deprecations for deprecated selective imports of certain symbols, e.g. as found in this PR (https://github.com/dlang/phobos/pull/7487). Reduced test case: ============================================= module a; import b; alias Types = AliasSeq!(int); // Should issue deprecation ============================================= module b; deprecated("Please import std.meta.AliasSeq directly!") public import std.meta : AliasSeq; =============================================
Comment #1 by dlang-bot — 2020-05-18T16:42:23Z
@MoonlightSentinel created dlang/dmd pull request #11158 "Fix Issue 20840 - No deprecation for template from deprecated selecti…" fixing this issue: - Fix Issue 20840 - No deprecation for template from deprecated selective import Selective imports are lowered to an AliasDeclarations which were discarded when resolving the actual TemplateDeclaration. So make sure to check the AD as well. https://github.com/dlang/dmd/pull/11158
Comment #2 by dlang-bot — 2020-05-23T03:42:55Z
dlang/dmd pull request #11158 "Fix Issue 20840 - No deprecation for template from deprecated selecti…" was merged into master: - d233c3926c560d262adc6d963b2f7e432130e0d1 by MoonlightSentinel: Fix Issue 20840 - No deprecation for template from deprecated selective import Selective imports are lowered to an AliasDeclarations which were discarded when resolving the actual TemplateDeclaration. So make sure to check the AD as well. https://github.com/dlang/dmd/pull/11158