Bug 19780 – `deprecated` is ignored on aliases of templates

Status
RESOLVED
Resolution
WORKSFORME
Severity
normal
Priority
P3
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2019-03-31T14:54:23Z
Last change time
2023-04-18T14:21:44Z
Assigned to
No Owner
Creator
Elias Batek (0xEAB)

Comments

Comment #0 by desisma — 2019-03-31T14:54:23Z
`deprecated` is ignored when applied to aliases of templates. Makes it hard to properly deprecate old symbol names when templates are involved. > void main() > { > auto var1 = new MyTemplateAlias!()(); // no warning > auto var2 = new NoTemplateAlias (); // warning > } > > deprecated alias MyTemplateAlias = MyTemplate; > class MyTemplate() {} > > deprecated alias NoTemplateAlias = NoTemplate; > class NoTemplate {} Probably related to: Issue 10181 - Elias
Comment #1 by razvan.nitu1305 — 2023-04-18T14:21:44Z
This seems to have been fixed. I am now getting: test.d(3): Deprecation: alias `test.MyTemplateAlias` is deprecated test.d(4): Deprecation: alias `test.NoTemplateAlias` is deprecated