Bug 21372 – False deprecation raised for templated overloaded struct method

Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2020-11-09T07:51:03Z
Last change time
2020-11-16T14:43:07Z
Keywords
pull
Assigned to
No Owner
Creator
FeepingCreature

Comments

Comment #0 by default_357-line — 2020-11-09T07:51:03Z
Consider the following code: ``` D struct S { deprecated("no") void foo(T)(int) { } void foo(T)(string) { } } void main() { S().foo!int("hi"); } ``` Since 2.094.0, this raises a deprecation warning, despite the fact that the overloaded call to foo doesn't select the deprecated version of foo.
Comment #1 by dlang-bot — 2020-11-09T08:14:16Z
@FeepingCreature created dlang/dmd pull request #11940 "Fix issue 21372: remove premature deprecation check." fixing this issue: - Fix issue 21372: remove premature deprecation check. https://github.com/dlang/dmd/pull/11940
Comment #2 by dlang-bot — 2020-11-16T14:43:07Z
dlang/dmd pull request #11940 "Fix issue 21372: remove premature deprecation check." was merged into stable: - d3a058a13b2ba18caf0b2e20dfa2b856dc4491ae by Mathis Beer: Fix issue 21372: remove premature deprecation check. Keep the check only for variable declarations. https://github.com/dlang/dmd/pull/11940