[Issue 7619] Broken deprecated feature with template function

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Nov 18 22:41:18 UTC 2021


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

Dlang Bot <dlang-bot at dlang.rocks> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull

--- Comment #6 from Dlang Bot <dlang-bot at dlang.rocks> ---
@MoonlightSentinel updated dlang/dmd pull request #10677 "Fix Issue 7619 -
Broken deprecated feature with template function" fixing this issue:

- Fix Issue 7619 - Infer deprecated for template instances

  Template instances may use deprecated symbols that were passed as
  template parameters or selected based on an instance-specific condition.
  Previously DMD raised deprecation messages for the deprecated symbol at
  the point of instantiation AND substitution inside of the template code.
  The latter is cannot be suppressed by using `deprecated` because that
  will only apply to certain instantiations.

  This commit changes the behavior to check whether a deprecated symbol
  is used inside of a template instance and marks the instance as
  `deprecated` if found. That way only the actual usage of the instance
  will raise deprecation messages.

  Ideally this should only apply to deprecated symbols that depend on the
  template parameters but those dependencies are not traceable in general
  (`static if`, `compiles`, ...).

https://github.com/dlang/dmd/pull/10677

--


More information about the Digitalmars-d-bugs mailing list