D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 20840 - No deprecation when using template from deprecated selective import
Summary: No deprecation when using template from deprecated selective import
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P1 normal
Assignee: No Owner
URL:
Keywords: pull
Depends on:
Blocks:
 
Reported: 2020-05-18 16:05 UTC by moonlightsentinel
Modified: 2020-05-23 03:42 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description moonlightsentinel 2020-05-18 16:05:48 UTC
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 Dlang Bot 2020-05-18 16:42:23 UTC
@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 Dlang Bot 2020-05-23 03:42:55 UTC
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