[Issue 19780] New: `deprecated` is ignored on aliases of templates

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Mar 31 14:54:23 UTC 2019


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

          Issue ID: 19780
           Summary: `deprecated` is ignored on aliases of templates
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: desisma at heidel.beer

`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

--


More information about the Digitalmars-d-bugs mailing list