Bug 20474 – Deprecation warnings inside deprecated function template

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2019-12-31T03:21:04Z
Last change time
2020-01-03T13:24:00Z
Keywords
pull
Assigned to
No Owner
Creator
moonlightsentinel

Comments

Comment #0 by moonlightsentinel — 2019-12-31T03:21:04Z
DMD issues deprecation warnings when compiling the following programm: --------------- deprecated struct S {} deprecated void foo()(S par) { S var; } deprecated void main() { foo(S.init); } --------------- onlineapp.d(3): Deprecation: struct onlineapp.S is deprecated onlineapp.d(3): Deprecation: struct onlineapp.S is deprecated --------------- It wont produce any warnings if foo is a normal function instead of a template. The duplicate warning is another issue probably related to 20467
Comment #1 by dlang-bot — 2019-12-31T03:26:31Z
@MoonlightSentinel created dlang/dmd pull request #10704 "Fix Issue 20474 - Deprecation warnings inside deprecated function template" fixing this issue: - Fix Issue 20474 - Deprecation warnings inside deprecated function template The scopes used for evaluating the parameters and body were never marked as deprecated. https://github.com/dlang/dmd/pull/10704
Comment #2 by dlang-bot — 2020-01-03T13:24:00Z
dlang/dmd pull request #10704 "Fix Issue 20474 - Deprecation warnings inside deprecated function template" was merged into master: - 03aa389265bd1a3e496d0003f981352563c255e5 by MoonlightSentinel: Fix Issue 20474 - Deprecation warnings inside deprecated function template The scopes used for evaluating the parameters and body were never marked as deprecated. https://github.com/dlang/dmd/pull/10704