Thread overview
[Issue 21176] deprecation inside template should show the instance loc as errorSupplemental
Sep 18
RazvanN
Sep 30
Basile-z
Oct 11
Basile-z
September 18
https://issues.dlang.org/show_bug.cgi?id=21176

RazvanN <razvan.nitu1305@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |razvan.nitu1305@gmail.com

--- Comment #1 from RazvanN <razvan.nitu1305@gmail.com> ---
I cannot reproduce this issue on run.dlang.io. However, I get what you mean:

deprecated int a;

void foo(T)()
{
    alias F = a;
}

void main()
{
    foo!int;
}

If it's an error it does show the stack trace, however I am not convinced that that should also be the case for deprecations.

--
September 30
https://issues.dlang.org/show_bug.cgi?id=21176

--- Comment #2 from Basile-z <b2.temp@gmx.com> ---
`deprecated` is sometimes used to refactorize. In this case it's essential to have the instantation sites as additional diagnostic.

--
September 30
https://issues.dlang.org/show_bug.cgi?id=21176

Boris Carvajal <boris2.9@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |boris2.9@gmail.com

--- Comment #3 from Boris Carvajal <boris2.9@gmail.com> ---
The required info is printed if you use "dmd -de" [1], but the more natural way to implement this is to add an option to the "-dw" switch like -dw=context.

[1]:
onlineapp.d(6): Deprecation: variable onlineapp.a is deprecated
onlineapp.d(11): Error: template instance onlineapp.foo!int error instantiating

--
October 11
https://issues.dlang.org/show_bug.cgi?id=21176

Basile-z <b2.temp@gmx.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |DUPLICATE

--- Comment #4 from Basile-z <b2.temp@gmx.com> ---


*** This issue has been marked as a duplicate of issue 20916 ***

--